Page 1 of 1

New Config Manager breaking SQL queries

Posted: Wed Feb 13, 2013 5:23 pm
by rseiwert
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.

Re: New Config Manager breaking SQL queries

Posted: Wed Feb 13, 2013 5:33 pm
by scottwilkerson
what XI version are you using? There was a bug related to this that is fixed in 2012R1.6