Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real Time Graphs may cause invalid index errors #3786

Closed
bmfmancini opened this issue Sep 2, 2020 · 3 comments
Closed

Real Time Graphs may cause invalid index errors #3786

bmfmancini opened this issue Sep 2, 2020 · 3 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@bmfmancini
Copy link
Member

Hey Guys

I have not found another report similar to below

I see the following errors when doing a realtime monitor on a custom graph template

2020/09/02 15:38:01 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_realtime.php[139]:CactiErrorHandler())
2020/09/02 15:38:01 - ERROR PHP NOTICE: Undefined index: graph_width in file: /var/www/html/cacti/graph_realtime.php on line: 139
2020/09/02 15:38:01 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_realtime.php[138]:CactiErrorHandler())
2020/09/02 15:38:01 - ERROR PHP NOTICE: Undefined index: graph_height in file: /var/www/html/cacti/graph_realtime.php on line: 138
2020/09/02 15:37:59 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_realtime.php[139]:CactiErrorHandler())
2020/09/02 15:37:59 - ERROR PHP NOTICE: Undefined index: graph_width in file: /var/www/html/cacti/graph_realtime.php on line: 139
2020/09/02 15:37:59 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_realtime.php[138]:CactiErrorHandler())

RRD INFO

RRDtool Command:
/bin/rrdtool graph - \
--imgformat=PNG \
--start='1598989380' \
--end='1599075751' \
--pango-markup  \
--title='xxxxx - CPU Usage' \
--vertical-label='percent' \
--slope-mode \
--base=1000 \
--height=200 \
--width=700 \
--tabwidth '40' \
--rigid \
--alt-autoscale-max \
--lower-limit='0' \
@bmfmancini bmfmancini added bug Undesired behaviour unverified Some days we don't have a clue labels Sep 2, 2020
@bmfmancini
Copy link
Member Author

Relevant lines

        }

        if (isset_request_var('size') && get_request_var('size') < 100) {
                $graph_data_array['graph_height'] = $graph_data_array['graph_height'] * $size / 100;
                $graph_data_array['graph_width']  = $graph_data_array['graph_width']  * $size / 100;
        }

@bmfmancini
Copy link
Member Author

Checked on 1.2.14 same lines

    if (isset_request_var('size') && get_request_var('size') < 100) {
                $graph_data_array['graph_height'] = $graph_data_array['graph_height'] * $size / 100;
                $graph_data_array['graph_width']  = $graph_data_array['graph_width']  * $size / 100;
        }

@TheWitness
Copy link
Member

Looks like the local_graph_id is not being passed into the function, or the graph no longer exists, and realtime is still running. Should be an error image for that.

TheWitness added a commit that referenced this issue Sep 7, 2020
Cacti 1.2.12 Realtime index errors
@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels Sep 7, 2020
@TheWitness TheWitness added this to the 1.2.15 milestone Sep 7, 2020
@netniV netniV changed the title Cacti 1.2.12 Realtime index errors Real Time Graphs may cause invalid index errors Nov 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants