New Config Manager breaking SQL queries

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

New Config Manager breaking SQL queries

Post 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.
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

Post by scottwilkerson »

what XI version are you using? There was a bug related to this that is fixed in 2012R1.6
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked