When I use the syntax being generated by the alert in mariadb I am getting back valid sql queries.
From the error, it lists the file:
/opt/librenms/LibreNMS/Alert/AlertRules.php
line 75, I also see on our installation that file was modified June 17th, unfortunately our logs don’t go back before this date to see if these syntax errors occurred prior to this modification.