Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 8 forks source link

[ReportIt] Show TOP10 graphs error #110

Open omse974 opened 3 months ago

omse974 commented 3 months ago

Describe the bug In ReportIt plugin, a bug appear when I activate "Show TOP10 graphs" in "Console>Public Reports>Show Report".

Screenshots reportit-show_top10_grahs_error reportit-realm reportit-show_top10_graphs

Expected behavior An error message appear and the plugin is deactivated. Then we must to uninstall and reinstall the plugin. In the plugin_realms table, we see a charts.php file which is not present in the plugin installation file. It might be the cause of this issue ?

Plugin ReportIt:

Desktop:

TheWitness commented 3 months ago

Anything in the Cacti log?

omse974 commented 3 months ago

Here, you find the Cacti log.

2024-04-15 07:40:19 - ERROR PHP ERROR in Plugin 'reportit': Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /srv/cacti/plugins/reportit/view.php:919 Stack trace: #0 /srv/cacti/plugins/reportit/view.php(919): abs() #1 /srv/cacti/plugins/reportit/view.php(743): show_graph_view() #2 /srv/cacti/plugins/reportit/view.php(47): show_report() #3 {main} thrown in file: /srv/cacti/plugins/reportit/view.php on line: 919 2024-04-15 07:40:19 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) 2024-04-15 07:40:19 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'reportit' 2024-04-15 07:40:19 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email. 2024-04-15 07:40:20 - CMDPHP WARNING: Page:view.php?action=show_report&header=false&id=1&filter=&info=-2&rows=-1&measurand=-1&data_source=-1&archive=-1&graph_mode=on&summary=&subhead= Generated a Fatal Error:500 2024-04-15 07:40:20 - CMDPHP ERROR: debounce key was truncated from debounce_page_error_view.php?action=show_report&header=false&id=1&filter=&info=-2&rows=-1&measurand=-1&data_source=-1&archive=-1&graph_mode=on&summary=&subhead= to debounce_page_error_view.php?action=show_report&he Backtrace: (/help.php[37]:debounce_run_notification(), /lib/functions.php[7328]:cacti_debug_backtrace()) 2024-04-15 07:40:20 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.