Home Directory Plugins Clustering and High-Availability Check MS Cluster Group Preferred Owner

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Check MS Cluster Group Preferred Owner

Current Version
1.0
Last Release Date
2012-04-24
Compatible With
  • Nagios 3.x
License
GPL
Hits
78268
Files:
FileDescription
check_preferred.ps1check_preferred.ps1
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Check MS Cluster Group Preferred Owner
This is a small powershell script for NSClient to check if Cluster Groups are running on their preferred owner on a Microsoft cluster.
This is a small powershell script for NSClient to check if Cluster Groups are running on their preferred owner on a Microsoft cluster. Simply add it to you NSClient scripts directory and put the following line in your nsc.ini

check_preferred=cmd /c echo scriptscheck_preferred.ps1; exit($lastexitcode) | PowerShell.exe -Command -

Don't forget to enable the running of ps1 scripts by powershell! You can do this by starting a powershell as administrator and give the command "Set-ExecutionPolicy Unrestricted"

This script was tested with MS SQL Cluster and Filecluster, but should work on any MS cluster.
Reviews (1)
bydiablo2424, March 30, 2018
I love this script, I just made one minor change to the Get-Cluster line.

Original:
Get-ClusterNode $Computer | Get-ClusterGroup | ?{ $_ | Get-ClusterResource }

Modified:
$ClusterGroups = Get-ClusterGroup | Where-Object {($_.Name -ne "Cluster Group")} | Where-Object {($_.Name -ne "Available Storage")}


The new modified version will not display the default "Cluster Group" and "Available Storage" blank clusters, which do not have a preferred owner, causing the script to always read WARNING.

However, being new to NAGIOS and CheckMK, I am unsure as to what define service and define command entries to put into my NAGIOS server config files. Can anyone help me out with that part?