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?
Check_mssql keeps timing out
Re: Check_mssql keeps timing out
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.
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.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check_mssql keeps timing out
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
An example can be found here
http://nagios.sourceforge.net/docs/3_0/ ... dlers.html
Re: Check_mssql keeps timing out
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:
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.
I configured the service to check MSSQL with the following command:
Code: Select all
$USER1$/check_mssql -H <host_IP> -U <username> -P <password>
Could you help me out with that?
Thank you in advance.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check_mssql keeps timing out
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.MDL wrote:If it fails to login, it performs my failover action.
http://nagios.sourceforge.net/docs/3_0/ ... dlers.html