SQL Failover Cluster - "Failover" process monitoring...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
srai
Posts: 11
Joined: Wed Jul 03, 2013 9:19 am

SQL Failover Cluster - "Failover" process monitoring...

Post by srai »

We have couple of SQL 2008 R2 Failover Clusters running in production that we have been monitoring via Nagios.
Is there a way to monitor Failover Cluster service itself, esp. is there a way Nagios can detect the actual Failover of the cluster and notify us?

Thanks,
Sharad
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SQL Failover Cluster - "Failover" process monitoring...

Post by abrist »

Stackoverflow has good answer:
From: http://serverfault.com/questions/24440/ ... -in-nagios
When it comes to SQL Server on a cluster, it must be installed as a virtual node, whether it's a default instance or a named instance. So a TCP check where the hostname is the virtual name with the correct port should work. For instance, if I have a two node cluster with physical nodes:

Physical1
Physical2

Don't monitor either of those for SQL Server. When SQL Server is installed, let's say I chose the virtual node name of Virtual1, then it's Virtual1 you'll want to monitor. And if SQL Server is up, then the cluster is up. If you just want to check to see if the cluster is up, look for the Network Name of the cluster group itself.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
srai
Posts: 11
Joined: Wed Jul 03, 2013 9:19 am

Re: SQL Failover Cluster - "Failover" process monitoring...

Post by srai »

This is what we have been doing and it does work this way... monitoring the virtual name instead of physical nodes.
However, we would like to know in real-time when a fail-over occurs on the cluster, helpful when it happens in off-hours, weekends or offdays

Thanks,
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SQL Failover Cluster - "Failover" process monitoring...

Post by abrist »

If the change of master is logged in a failover scenario, you could check the windows event log for such information through nscient/wmi.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
srai
Posts: 11
Joined: Wed Jul 03, 2013 9:19 am

Re: SQL Failover Cluster - "Failover" process monitoring...

Post by srai »

Yes, I think that's the only best route to go on this issue. I just implemented the script in production after testing it few times... works!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SQL Failover Cluster - "Failover" process monitoring...

Post by sreinhardt »

Awesome, I'll lock this up. Adding just another point for more immediate alerting, you might look into sending snmptraps from the windows server to alert for this issue. I imagine M$ has something to do this.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked