Home Directory Plugins Operating Systems Windows check_csv_freespace.ps1 for MS HyperV

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_csv_freespace.ps1 for MS HyperV

Current Version
0.9a
Last Release Date
2014-07-15
Compatible With
  • Nagios 3.x
Hits
43483
Files:
FileDescription
check_csv_freespace.ps1check_csv_freespace.ps1
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
checks your mounted CSV for free disk space

2014-07-15: fixed missing exitcode
as your Cluster Shared Volume (CSV) is mounted as c:ClusterStorage there's no easy way to check if your Storage is running out of diskspace

the script returns status as well as perf-data


running the script on the hyperv-host:

.check_csv_freespace.ps1 -n -w 80 -c 90
e.g.: .check_csv_freespace.ps1 -n csv1-scsi -w 80 -c 90



how to use with nagios:

* copy the script to your nsclient++ directory
* add command alias to nsc.ini
* command[check_csv_freespace]=cmd /c echo .check_csv_freespace.ps1 -n $ARG1$ -w $ARG2$ -c $ARG3$ | powershell.exe -command -
* set allow_arguments=1
* restart nsclient++ service
* add nagios command

define command {
command_name check_hyperv_csv_freespace
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_csv_freespace -a $ARG1$
}

* add nagios service check

define service{
use remote-service
hostgroup_name hyperv-hosts
servicegroups hyperv-services
service_description Cluster: CSV1-SCSI free disk space
check_command check_hyperv_csv_freespace!csv1-scsi 80 90
}


License: no license

Changes:
2014-07-15: fixed missing exitcode