Check MSCS resources & nodes via NSClient++
Checking of Microsoft Cluster Services via vbscript & NSClient++ (NRPE Handlers).
You can choose between resources or nodes.
For additional help call cscript check_microsoft_cluster.vbs -h
Usage
For use with NSClient++ please add the following line to your NSC.INI [NRPE Handlers]:
check_mscs=cscript.exe //T:30 //NoLogo scripts\check_microsoft_cluster.vbs $ARG1$ $ARG2$
and copy "check_microsoft_cluster.vbs" into "scripts\" folder at each node.
Refer to NSClient++ Documentation for using remote checks via NRPE.
Please remember to point this check to the corresponding clustered ressource (type "Cluster Name" & "Cluster IP Address"), not to a single node (please look at section "testing & debugging").
Command definition
define command {
command_name check_mscs_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c check_mscs -a "$ARG1$" "$ARG2$"
}
Service definition
define service{
use generic-service
host_name MSCSSVC01
service_description MSCS Resources
process_perf_data 0
check_command check_mscs_nrpe!CLRESP
}
Functionality:
The plugin will accept the following parameters:
check_microsoft_cluster.vbs CLRES|CLRESP [ressource list]
check_microsoft_cluster.vbs CLNODE [node list]
For testing & debugging:
check_microsoft_cluster.vbs LIST
CLRES: Ressources
The script will accept a comma separated list of resource names as arguments. You will receive an error message "CRITICAL - Missing arguments" plus CRITICAL status if there are no arguments. While the script is dealing correct with resource names with spaces in it please quote your list of resources as mentioned above.
You will get "OK" if all ressources are online.
"OK - Disk R:,Disk S:"
Any resource from argument list that has a status different from "online" is causing the check result to be "CRITICAL". In that case you will find the corresponding resource name with its status in the information field.
"CRITICAL - Disk S: (offline), OK - Disk R:"
CLRESP: Ressources
Checking the same as parameter "CLRES" with additional check if the "actual owner" is the "preferred owner" of the ressource.
CLNODE: Nodes
The script will accept a comma separated list of node names as arguments. You will receive an error message "CRITICAL - Missing arguments" plus CRITICAL status if there are no arguments.
You will get "OK" if all nodes are up and joined.
"OK - MSCSNODE01,MSCSNODE02"
If one of the nodes is paused or actually joining you will get a WARNING status.
"WARNING - MSCSNODE02 (paused), UP - MSCSNODE01"
Down nodes or nodes with unknown status will cause the check to return CRITICAL.
"CRITICAL - MSCSNODE02 (down), UP - MSCSNODE01"
The special case - all nodes are paused (or joining) - will also result in critical status since the cluster has no longer high availability status.
"CRITICAL - MSCSNODE01 (paused), MSCSNODE02 (paused), UP - NONE !!!"
Help:
For help call "cscript check_microsoft_cluster.vbs -h"
Disclaimer:
This software comes without any warranty and has to be treated "as is". Feel free to change it to fit your needs or contact me (hestadler@gmx.at) for any kind of comment.
License Information:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see .