I am trying to set up a MSSQL Query monitor using the Monitoring wizard. Once I finish the wizard steps, I see that the command the wizard generated is:
Code: Select all
check_xi_mssql_query!-H xxx.xxx.xxx.xxx --port 1433 --username xxx --password "xxx" --database xxx --query 'SELECT COUNT(*) FROM ELMAH_Error WHERE TimeUtc >= DATEADD(mi, -20, GETUTCDATE())' --result '0' --warning 1 --critical 10If I try the following command from the Nagios server (/usr/local/nagios/libexec) , I get the expected results:
Code: Select all
check_mssql -H xxx.xxx.xxx.xxx -P 'xxx' -U xxx -d xxx SELECT COUNT(*) FROM ELMAH_Error WHERE TimeUtc >= DATEADD(mi, -20, GETUTCDATE())' -r "0" -w 1 -c 10
Why does the monitor using check_xi_mssql_query always return a (null)?
Also, what are these *_xi_* versions of the scripts/plugins? I am having the same issue with the database and the server versions of the command.
Thanks,
Ashutosh