Cacti/plugin_syslog

[Syslog 1.2.x] Plugin crashing

Closed this issue · 6 comments

While doing testing I am seeing the syslog plugin crash

It seems that when you select reporting level device after the next poll the plugin crashes

2022-03-28 10:00:11 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'syslog'
--
2022-03-28 10:00:11 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2022-03-28 10:00:11 - ERROR PHP ERROR in Plugin 'syslog': Uncaught Error: Call to undefined function syslog_determine_config() in /var/www/html/cacti/plugins/syslog/syslog.php:36 Stack trace: #0 {main} thrown in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 36
2022-03-28 10:00:05 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.
2022-03-28 10:00:05 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'syslog'
2022-03-28 10:00:05 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2022-03-28 10:00:05 - ERROR PHP ERROR in Plugin 'syslog': Uncaught Error: Call to undefined function syslog_db_assoc_cell_prepared() in /var/www/html/cacti/plugins/syslog/functions.php:1150 Stack trace: #0 /var/www/html/cacti/plugins/syslog/syslog_process.php(192): syslog_process_alerts(16) #1 {main} thrown in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 1150

Pushed a change, but I think it may flag an error with SYSLOG_CONFIG in one of the functions, but try it out.

The plugin crashes and will not reenable after these changes



022-03-28 10:44:28 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'syslog'
--
2022-03-28 10:44:28 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2022-03-28 10:44:28 - ERROR PHP COMPILE_ERROR in Plugin 'syslog': Cannot redeclare syslog_determine_config() (previously declared in /var/www/html/cacti/plugins/syslog/setup.php:1223) in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 2316

I removed

the syslog_determine_config() from functions.php to get the plugin to re-enable

This is fixed

Whoops. Let wine, more Cacti.

Issue was fixed here: 01c8f03