Syntax errors in librenms logs

====================================

Component Version
LibreNMS 1.46-91-gde7ce7c75
DB Schema 275
PHP 7.2.10-0ubuntu0.18.04.1
MySQL 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.0
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

hello ,

i am getting the following error in librenms.log. i am using distrubuted polling and getting this error from all of my pollers. and also my alert transport notifications is not working properly although all alert script tests pass.
not sure whether the error is related with the alerts or not. FYI and have a good day.

[2018-12-29 09:16:29] 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 ‘LIMIT 1’ at line 1 (SQL: LIMIT 1) (SQL: LIMIT 1)
/opt/librenms/includes/device-groups.inc.php:236
/opt/librenms/includes/device-groups.inc.php:299
/opt/librenms/includes/polling/functions.inc.php:344
/opt/librenms/poller.php:155
/opt/librenms/poller.php 458 2018-12-29 09:16:29 - 1 devices polled in 11.20 secs
/opt/librenms/poller.php 541 2018-12-29 09:16:29 - 1 devices polled in 10.99 secs
/opt/librenms/poller.php 411 2018-12-29 09:16:29 - 1 devices polled in 10.53 secs
[2018-12-29 09:16:29] 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 ‘LIMIT 1’ at line 1 (SQL: LIMIT 1) (SQL: LIMIT 1)
/opt/librenms/includes/device-groups.inc.php:236
/opt/librenms/includes/device-groups.inc.php:299
/opt/librenms/includes/polling/functions.inc.php:344
/opt/librenms/poller.php:155
[2018-12-29 09:16:29] 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 ‘LIMIT 1’ at line 1 (SQL: LIMIT 1) (SQL: LIMIT 1)
/opt/librenms/includes/device-groups.inc.php:236
/opt/librenms/includes/device-groups.inc.php:299
/opt/librenms/includes/polling/functions.inc.php:344
/opt/librenms/poller.php:155
/opt/librenms/poller.php 426 2018-12-29 09:16:29 - 1 devices polled in 10.34 secs
/opt/librenms/poller.php 425 2018-12-29 09:16:30 - 1 devices polled in 10.87 secs

You ever got this resolved? Seem to have similar errors…

Probably you have errors in your device groups you created.

image
Which would you think may be problematic? :slight_smile:

The problem is in the definition, not the name…

1 Like

Ahh, I see, thanks:)

I think it didnt like
ESXHosts All ESX Boxes %devices.hostname ~ esx%.fqdn ||
%devices.hostname ~ %esx%fqdn ||

Removed the second check and looks better now :sunny:
Thanks

1 Like