This article’s script could be run on any Windows cluster that uses Cluster Shared Volumes. It is simple: it looks for the CSV that you specified, finds out its total space, finds out its free space, calculates the percentage, and returns an OK, warning, or critical status. In order to use this script, you must have a functioning Nagios environment and the NSClient++ software installed on each node in the cluster(s) to be monitored. You must also have placed the clusterbase.ps1 script as indicated in the cluster base script article. None of the Hyper-V scripts are required for this check script to operate.

If you’re new to Nagios you should definitely check out the article How To: Monitor Hyper-V with Nagios first, then move onto the cluster base script article linked about, and continue reading below.

NSClient++ Configuration

These changes are to be made to the NSClient++ files on all Hyper-V hosts to be monitored.

C:Program FilesNSClient++nsclient.ini

If the indicated INI section does not exist, create it. Otherwise, just add the second line to the existing section.

The NSClient++ service must be restarted after all changes to its ini file.

C:Program FilesNSClient++scriptscheck_csvspace.ps1

The required script clusterbase.ps1 must exist in the same folder.

Nagios Configuration

These changes are to be made on the Nagios host. I recommend using WinSCP as outlined in our main Nagios and Ubuntu Server articles.


The Hyper-V Host Commands section should already exist if you followed our main Nagios article. Add this command there. If you are not working with a Hyper-V system, then you can create any section heading that makes sense to you, or just insert the command wherever you like.


This file and section were created in the Hyper-V base scripts article. As long as it appears somewhere in one of the activated .cfg files, it will work.

This is a sample! You must use your own cluster name object!

Nagios must be restarted after these files are modified.