Our slack transport stopped providing any events sometime on August 4th, our custom alerts as well as default alerts aren’t populating into the slack hooks we have configured.
Also seeing sql errors in the librenms.log:
[2020-08-13 16:52:41] production.ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘~ “^cisco.*State$” && sensors.sensor_alert = “1”) = 1’ at line 1 (SQL: SELECT * FROM devices,sensors WHERE (devices.device_id = 93 AND devices.device_id = sensors.device_id) AND (sensors.sensor_current != “1” && sensors.sensor_current != “5” && sensors.sensor_type ~ “^cisco.*State$” && sensors.sensor_alert = “1”) = 1) (SQL: SELECT * FROM devices,sensors WHERE (devices.device_id = 93 AND devices.device_id = sensors.device_id) AND (sensors.sensor_current != “1” && sensors.sensor_current != “5” && sensors.sensor_type ~ “^cisco.*State$” && sensors.sensor_alert = “1”) = 1)#0 /opt/librenms/LibreNMS/Alert/AlertRules.php(75): dbFetchRows()
We pass a ./vaidate.php without any warnings.
Reviewing the logs, we’ve apparently been seeing these syntax errors as far back as at least 6-29.
Any recommendations on what to review next? Was there another alert syntax change in recent months?
One potential issue is we are still running librenms on debian 9, is that a known problem? We also have separated out the db to a dedicated server, which is running mariadb 10.3.24 on ubuntu 18.04.