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_all_csv_frespace

Rating
3 votes
Favoured:
0
Compatible With
  • Nagios 3.x
  • Nagios 4.x
Owner
Hits
8015
Files:
FileDescription
check_all_csv_frespace.ps1check_all_csv_frespace.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!
This is Powershell script for Microsoft Cluster (Hyper-V) 2008/2012 for checking free space in all yours CSV (cluster shared volumes).
I used the script for checking amount of free space in my cluster shared volumes. Scrip grabs list of ALL yours CSVs and check which are going to full.
There are thresholds for Warning and Critical (%). CSVs that exceeded warning or critical threshold will be outputed to nagios. So you will be aware in time.

Setup:
1. Download script check_all_csv_frespace.ps1 and put it on all nodes of your Cluster. So if Cluster Owner will be changed your check will be not broken.

2. Configure you nsclient.ini files. Specify new check definition in sections:
[/settings/external scripts]
allow arguments = true
allow nasty characters = true
timeout = 200

[/settings/external scripts/scripts]
check_all_csv=cmd /c echo scriptscheck_all_csv_frespace.ps1 $ARG1$ $ARG2$ | powershell.exe -command -

3. NSClient++ service must work under account with sufficient permissions for run powershell and connect to cluster. Restart NSclient service.

4. In commands.cfg:
#Example: ./check_nrpe -H msfailvercluster_dns_name -c check_all_csv -t 200 -a 5 2
define command{
command_name check_all_csv
command_line $USER1$/check_nrpe -H $ARG1$ -c $ARG2$ -t $ARG3$ -a $ARG4$ $ARG5$
}

5. Define the service in windows.cfg (for example):
define service{
use generic-service
host_name HVFAILOVERCLUSTER
service_description CSVs Free Space
check_command check_all_csv!check_all_csv!200!5!2
normal_check_interval 20
retry_check_interval 10
notification_interval 0
notes Check free space in ALL CSVs of Failover Cluster.
}

Check config & reload & enjoy!