Home Directory Plugins Operating Systems Windows check_all_csv_frespace_v2

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_v2

Rating
0 votes
Favoured:
0
Last Release Date
2019-08-23
Compatible With
  • Nagios 3.x
  • Nagios 4.x
Owner
License
GPL
Hits
4188
Files:
FileDescription
check_all_csv_frespace.ps1First release
check_all_csv_frespace.ps1Second release
check_all_csv_frespace.ps1Last release
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
NRPE Nagios Check for Windows Server 2008/2012 Hyper-V Cluster for Checking CSV Space (Cluster Shared Volumes).
This is Powershell script for Microsoft Cluster (Hyper-V) 2008/2012 for checking free space in all yours CSV (cluster shared volumes) based in check_all_csv_frespace of whutest.

I made some improvements and modifications to the original script:

1. Disabled log, not to create files the server, since the original script does not delete the log;
2. Changed variables and output files to System Temp folder.
3. Outputs have been changed to always show the Status of all CSVs.

*** UPDATE ***
1. Added performance output
2. Output updated to Nagios Standard
3. Fixed bugs

-------------------------------------

Use this 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$; exit($lastexitcode) | 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 $HOSTADDRESS$ -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
}

Check config & reload & enjoy!