Check_mssql keeps timing out

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MDL
Posts: 12
Joined: Wed May 16, 2012 5:03 am

Check_mssql keeps timing out

Post by MDL »

Hi all,

I am using the check_mssql plugin for Nagios XI to monitor the MSSQL service on of our servers. Attached to this service is an event handler which performs a failover action in case the MSSQL service goes down. However, Nagios keeps saying every now and then that the MSSQL service is down, while it's not. Sometimes hour after hour, sometimes after a few days. It is really random. It is only saying this for about 2 seconds, then the service check turns green "OK" again. However, in these 2 seconds, Nagios performs the failover action...
It is getting quite annoying and I can't seem to find the problem. The MSSQL service on the server isn't down at all.

Can anyone help me out with this issue?
MDL
Posts: 12
Joined: Wed May 16, 2012 5:03 am

Re: Check_mssql keeps timing out

Post by MDL »

I have one other question.
Nagios performs a check every 5 minutes and raises an alert after 5 failed checks. Is it also possible to configure the event handler to occur after 2 or 3 of the checks fail? In that case, Nagios won't perform my failover event handler due to network hickups.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_mssql keeps timing out

Post by scottwilkerson »

You can have your event handler do different things based on the $SERVICESTATETYPE$ or $HOSTTATETYPE$ by passing that in in the command you setup

An example can be found here
http://nagios.sourceforge.net/docs/3_0/ ... dlers.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
MDL
Posts: 12
Joined: Wed May 16, 2012 5:03 am

Re: Check_mssql keeps timing out

Post by MDL »

I am using the check_mssql plugin. I didn't write this plugin myself.
I configured the service to check MSSQL with the following command:

Code: Select all

$USER1$/check_mssql -H <host_IP> -U <username> -P <password> 
This plugin only checks wether it is able to login to the MSSQL engine or not. If it fails to login, it performs my failover action. Now I am looking for an argument to add to my command so it will only execute the eventhandler after several tries.
Could you help me out with that?

Thank you in advance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_mssql keeps timing out

Post by scottwilkerson »

MDL wrote:If it fails to login, it performs my failover action.
I am assuming your "failover action" is a command you have setup in XI correct? If you only want event handlers to do something some of the time based on the "state" you will need to do something very similar to what is described on the link below.

http://nagios.sourceforge.net/docs/3_0/ ... dlers.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked