It seems that SQL query checks entered via the new config manager break the SQL query by esc'ing out the (, *, and ). In my case the query was entered without any esc chars but when clicking the test button I get
/usr/local/nagios/libexec/check_mysql_query -q "Select count\(\*\) from portal2.ClientInstallations2" -w 10 -c 20
QUERY CRITICAL: Error with query - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\(\*\) from portal2.ClientInstallations2' at line 1
/usr/local/nagios/libexec/check_mysql_query -q "Select count(*) from portal2.ClientInstallations2" -w 10 -c 20
QUERY WARNING: 'Select count(*) from portal2.ClientInstallations2' returned 16.000000
I did enter via the legacy ccm and it seemed to start working. I will need to test some more but seems like an issue to me.
New Config Manager breaking SQL queries
New Config Manager breaking SQL queries
Grumpy Olde IT Guy
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: New Config Manager breaking SQL queries
what XI version are you using? There was a bug related to this that is fixed in 2012R1.6