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

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
583
Files:
FileDescription
check_all_csv_frespace.ps1First release
check_all_csv_frespace.ps1Second release
check_all_csv_frespace.ps1Last release

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

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!