Skip to content

Instantly share code, notes, and snippets.

@philrandal
philrandal / Nagios_Cluster.ps1
Last active June 26, 2019 15:20 — forked from hpmmatuska/Nagios_Cluster.ps1
Cluster Monitoring for Nagios. It's monitor Cluster Nodes, Groups, Resources and Prefered Owners.The script is for PS4 (Windows 2012). Earlier windows are missing the method CIM method getpreferedowner -> you need to comment that section.
$Status = 0
# bitmask
# 0-OK
# 1-Warning
# 2-Error
# 4-Unknown
# then logical or each result for final return code
$ItemName = $null
# This has to be unique per host in NAGIOS