I am getting this message thousands of times per day in librenms.log :
[2019-07-24 22:35:04] production.ERROR: Device Group ‘North America POPs’ generates invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘sjc-’ in ‘where clause’ (SQL: select exists(select * from devices where (sjc- REGEXP sjc) and devices.device_id = 29) as exists)
Is this a config error on my part or is it a bug ?
Service is running as monweb:users so the user fix at the end doesn’t apply.
As for the devices with slow polling - they have many interfaces so they don’t complete within 1 minute (we use 1 minute polling). I don’t think that’s the cause, but I’m mentioning it anyway.
Thanks for the pointer. I have three devices in the network (Devices -> All devices -> Network) that are called:
sjc-asr-r15-br2.our.domain
sjc-asr-br1
sjc-bdr2.our.domain
Furthermore, in Devices -> Device groups -> North America POPs : I assume this looks at our devices, so it will represent the device names above.
Could t be that there’s a bug in librenms that doesn’t like device names called ‘sjc-’ - maybe the ‘-’ is being misinterpreted as a regex or some form of delimiter? Or perhaps these devices are configured wrong in some way that I can’t seem to find?
The strange thing is that I’ve got other devices called gw1-blah-blah.domain , gw2-… , and yet only the sjc-… are problematic.
We dont have any custom SQL - libremns is a clean install and configured only via the various config files.
I just deleted it. The device hostnames aren’t consistent and we can’t trust that devices in sjc actually have names sjc- . So the easiest solution was delete this group and the log no longer has these line.
Big thanks to you and murrant for guiding me to find the problem.