Cacti/plugin_syslog

updated to latest commit - SQL errors now.

Closed this issue · 7 comments

Describe the bug
Log files are filling with SQL errors. I think it just started with 33da506

but can't be positive.

To Reproduce
View logs:

2024-11-05 12:27:18 - SQL Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1146]:syslog_db_fetch_assoc_prepared(), /plugins/syslog/database.php[167]:db_fetch_assoc_prepared(), /lib/database.php[909]:db_execute_prepared())
2024-11-05 12:27:18 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column '' in 'where clause'
2024-11-05 12:27:18 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1123]:syslog_get_alert_sql(), /plugins/syslog/functions.php[1633]:CactiErrorHandler())
2024-11-05 12:27:18 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "textField" in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 1633
2024-11-05 12:27:18 - SQL Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1170]:syslog_process_alert(), /plugins/syslog/functions.php[1254]:syslog_db_fetch_assoc_prepared(), /plugins/syslog/database.php[167]:db_fetch_assoc_prepared(), /lib/database.php[909]:db_execute_prepared())
2024-11-05 12:27:18 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column '' in 'where clause'
2024-11-05 12:27:18 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1123]:syslog_get_alert_sql(), /plugins/syslog/functions.php[1625]:CactiErrorHandler())
2024-11-05 12:27:18 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "textField" in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 1625
2024-11-05 12:27:18 - SQL Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1170]:syslog_process_alert(), /plugins/syslog/functions.php[1254]:syslog_db_fetch_assoc_prepared(), /plugins/syslog/database.php[167]:db_fetch_assoc_prepared(), /lib/database.php[909]:db_execute_prepared())
2024-11-05 12:27:18 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column '' in 'where clause'
2024-11-05 12:27:18 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1123]:syslog_get_alert_sql(), /plugins/syslog/functions.php[1625]:CactiErrorHandler())
2024-11-05 12:27:18 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "textField" in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 1625

Update again ;) Moving fast. Having to slow down till tomorrow though.

Wait, that one is real. I'll fix it before heading out.

Should be fixed now.

Please confirm.

just updated, standby 30 seconds :)

errors remain, just on different lines now. no rush, nothing else seems affected so if you have to go.

edit: I'm weird, I run dev code on a production network.. I don't think I've ever had a serious breaking commit, and it's easy to reset --hard if I have too.

024-11-05 12:53:36 - SQL Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1154]:syslog_db_fetch_assoc_prepared(), /plugins/syslog/database.php[167]:db_fetch_assoc_prepared(), /lib/database.php[909]:db_execute_prepared())
2024-11-05 12:53:36 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column '' in 'where clause'
2024-11-05 12:53:36 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1131]:syslog_get_alert_sql(), /plugins/syslog/functions.php[1645]:CactiErrorHandler())
2024-11-05 12:53:36 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "textField" in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 1645
2024-11-05 12:53:36 - SQL Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1178]:syslog_process_alert(), /plugins/syslog/functions.php[1262]:syslog_db_fetch_assoc_prepared(), /plugins/syslog/database.php[167]:db_fetch_assoc_prepared(), /lib/database.php[909]:db_execute_prepared())
2024-11-05 12:53:36 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column '' in 'where clause'
2024-11-05 12:53:36 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1131]:syslog_get_alert_sql(), /plugins/syslog/functions.php[1637]:CactiErrorHandler())
2024-11-05 12:53:36 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "textField" in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 1637
2024-11-05 12:53:36 - SQL Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1178]:syslog_process_alert(), /plugins/syslog/functions.php[1262]:syslog_db_fetch_assoc_prepared(), /plugins/syslog/database.php[167]:db_fetch_assoc_prepared(), /lib/database.php[909]:db_execute_prepared())
2024-11-05 12:53:36 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column '' in 'where clause'
2024-11-05 12:53:36 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog_process.php[196]:syslog_process_alerts(), /plugins/syslog/functions.php[1131]:syslog_get_alert_sql(), /plugins/syslog/functions.php[1637]:CactiErrorHandler())
2024-11-05 12:53:36 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "textField" in file: /var/www/html/cacti/plugins/syslog/functions.php on line: 1637

extra fun: viewing the syslog tab:

2024-11-05 13:00:58 - PHP ERROR Backtrace: (CactiShutdownHandler())
2024-11-05 13:00:58 - ERROR PHP ERROR: Uncaught TypeError: title_trim(): Argument #1 ($text) must be of type string, null given, called in /var/www/html/cacti/plugins/syslog/syslog.php on line 1848 and defined in /var/www/html/cacti/lib/functions.php:37 Stack trace: #0 /var/www/html/cacti/plugins/syslog/syslog.php(1848): title_trim() #1 /var/www/html/cacti/plugins/syslog/syslog.php(102): syslog_messages() #2 {main} thrown in file: /var/www/html/cacti/lib/functions.php on line: 37
2024-11-05 13:00:58 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1848]:CactiErrorHandler())
2024-11-05 13:00:58 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "" in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1848
2024-11-05 13:00:58 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1848]:CactiErrorHandler())
2024-11-05 13:00:58 - ERROR PHP WARNING in Plugin 'syslog': Trying to access array offset on value of type null in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1848
2024-11-05 13:00:58 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1839]:CactiErrorHandler())
2024-11-05 13:00:58 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "" in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1839
2024-11-05 13:00:58 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1839]:CactiErrorHandler())
2024-11-05 13:00:58 - ERROR PHP WARNING in Plugin 'syslog': Trying to access array offset on value of type null in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1839
2024-11-05 13:00:58 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1838]:CactiErrorHandler())
2024-11-05 13:00:58 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "" in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1838
2024-11-05 13:00:58 - PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1838]:CactiErrorHandler())
2024-11-05 13:00:58 - ERROR PHP WARNING in Plugin 'syslog': Trying to access array offset on value of type null in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1838