Page 1 of 1
MS SQL Wizard having extra characters in query string
Posted: Wed May 22, 2013 10:39 am
by sujitt
when I create a query based monitor using the MSsQL query wizard. query would not run and on inspection I found that there were extra characters embeded in the query string.
here is an example
check_xi_mssql_query!--username xxxx --password "xxxx" --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
Re: MS SQL Wizard having extra characters in query string
Posted: Wed May 22, 2013 11:53 am
by slansing
Can you show us what the string "should" look like? Do you have a screenshot of the service's CCM page in CCM > Services > "Service Name" or can you copy the service definition from:
Code: Select all
/usr/local/nagios/etc/services/"servicename".cfg
Please remove any security related information.
Re: MS SQL Wizard having extra characters in query string
Posted: Wed May 22, 2013 3:43 pm
by sujitt
This is the view from CCM services edit view.
--username xxx--password "xxxx" --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
the query should look like
select count(*) from sys.sysperinfo
Below is the file view
define service {
host_name xxxxx
service_description MSSQL Query - SampleQuery
use xiwizard_mssqlquery_service
check_command check_xi_mssql_query!--username xxxx --password xxxxx --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard mssqlquery
register 1
}
Re: MS SQL Wizard having extra characters in query string
Posted: Wed May 22, 2013 3:46 pm
by abrist
What version of XI are you running?
Re: MS SQL Wizard having extra characters in query string
Posted: Wed May 22, 2013 4:43 pm
by sujitt
Nagios XI 2012R1.6
Re: MS SQL Wizard having extra characters in query string
Posted: Wed May 22, 2013 4:52 pm
by abrist
First of all, that version of XI may have an issue with url encoding in the ccm, I suggest you upgrade to 2012r2.0. Afterwards, try fixing the check $ARGn$ and let us know if the problem still persists.
Re: MS SQL Wizard having extra characters in query string
Posted: Thu May 23, 2013 9:14 am
by sujitt
we are on a trial version of xi, will upgrade work on that?
Re: MS SQL Wizard having extra characters in query string
Posted: Thu May 23, 2013 11:30 am
by slansing
You should be able to download the tarball, and install it as per our upgrade instructions, you trial will still expire on the same day:
http://assets.nagios.com/downloads/nagi ... ctions.pdf