Page 1 of 1

MSSQL_Query_SuspectDB issue

Posted: Thu May 16, 2019 1:53 am
by RIDS_I2MP
Hello Team,

We have few MSSQl services running on DB servers and those services we are monitoring form Nagios end. We are getting error in one query, below are the details:

Service name: MSSQL_Query_SuspectDB

Check command : check_xi_mssql_query

Command: $USER1$/check_mssql -H $HOSTADDRESS$ $ARG1$

$ARG1$: --username 'nagios' --password '********' --database 'master' --port 1433 --query "select+name%2Cstate_desc+From+sys.databases++where+state_desc+%3C%3E+%27ONLINE%27" --result "" --decode --querycritical 0


This service is configured on a number of servers, but we are getting error in only few servers, not sure what the problem is?

Below is the error:
CRITICAL: Query result RESTORING was higher than Query critical threshold 0.

CRITICAL: Query result OFFLINE was higher than Query critical threshold 0.

Above two different errors we are getting on different servers.

Please help us to understand the issue.

Thanks in advance!!

Re: MSSQL_Query_SuspectDB issue

Posted: Thu May 16, 2019 1:11 pm
by tgriep
Can you run the following command in a shell so we can see which version of the plugin you are running?

Code: Select all

/usr/local/nagios/libexec/check_mssql -V
In your command, you have set the querycritical threshold to 0 so if the check runs and returns a value larger than 0, it will generate the message, what is the current output of the check?