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

Undefined variable warning can appear when using 95th percentile graphs #3340

Closed
rprofijt opened this issue Mar 11, 2020 · 3 comments
Closed
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@rprofijt
Copy link

Describe the bug
After upgrading to 1.2.10 (from 1.1.38) we get these errors in the cacti log:

2020/03/11 11:28:24 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_json.php[159]:rrdtool_function_graph(), /lib/rrd.php[1586]:variable_nth_percentile(), /lib/graph_variables.php[449]:nth_percentile(), /lib/graph_variables.php[33]:rrdtool_function_stats(), /lib/graph_variables.php[140]:nth_percentile_fetch_statistics(), /lib/graph_variables.php[153]:CactiErrorHandler())
2020/03/11 11:28:24 - ERROR PHP NOTICE: Undefined index: values in file: /opt/cacti/cacti-prod/lib/graph_variables.php on line: 153

To Reproduce
Steps to reproduce the behavior:

Open/render a graph with 95th percentile and nan values.

Expected behavior
Render the empty broken graph without PHP errors

TheWitness added a commit that referenced this issue Mar 12, 2020
PHP Error when loading broken/empty 95th percentile graphs
@TheWitness
Copy link
Member

Update the graph_variables.php from the 1.2.x branch and let us know if this is fixed.

@TheWitness TheWitness added this to the 1.2.11 milestone Mar 12, 2020
@TheWitness TheWitness added bug Undesired behaviour resolved A fixed issue labels Mar 12, 2020
@rprofijt
Copy link
Author

Fixed, thanks!

@a-vasilishin
Copy link

a-vasilishin commented Mar 26, 2020

I have the same problem. Cacti 1.2.10 download via copy/paste graph_variables.php from the 1.2.x branch.
2020/03/26 19:14:05 - CMDPHP SQL Backtrace: (/graph_json.php[159]:rrdtool_function_graph(), /lib/rrd.php[1586]:variable_nth_percentile(), /lib/graph_variables.php[476]:nth_percentile(), /lib/graph_variables.php[33]:rrdtool_function_stats(), /lib/graph_variables.php[84]:rrdtool_function_fetch(), /lib/rrd.php[899]:boost_fetch_cache_check(), /lib/boost.php[272]:boost_process_poller_output(), /lib/boost.php[629]:db_fetch_cell(), /lib/database.php[383]:db_fetch_cell_prepared(), /lib/database.php[399]:db_execute_prepared())

Update: apache restart and problem gone

@netniV netniV changed the title PHP Error when loading broken/empty 95th percentile graphs Undefined variable warning can appear when using 95th percentile graphs Apr 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2020
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

3 participants