You are here

Problems Getting Disk Space for Windows

3 posts / 0 new
Last post
cgroothius_87149's picture
Problems Getting Disk Space for Windows

Hi All,

I have implemented OpsView Core withing a VMware player VM.  Have a host monitored and have active service checks running against it.  However I cannot get Windows Disk Space check to go.

From advice on a previous post ( I have implemented:-

check_nrpe -H $HOSTADDRESS$ -c nsc_checkdrivesize -a 'Drive=%WINDOWS_DRIVE%: %WINDOWS_DRIVE:1% ShowAll=long' 

This does not work and from OPsview I get connection refused by host displayed in the GUI.  From  the Test Service Check utility on the Opsview Core box I get:-

$ /usr/local/nagios/libexec/check_nrpe -H AHBLD001PR.HQ.ADVENTINC.COM -c nsc_checkdrivesize -a 'Drive=: MinWarnFree=10% MinCritFree=5% ShowAll=long'
 CRITICAL: Could not get free space for: :: :: reason: 3: The system cannot find the path specified


I can Telnet to the agent box on 5666 no issues.  Other checks are working fine.  

From the Test Agent exe I get :-

check_nrpe -H -c nsc_checkdrivesize -a 'Drive=%WINDOWS_DRIVE%: %WINDOWS_DRIVE:1% ShowAll=long'

d NSClient++.cpp(1144) Injecting: check_nrpe: -H,, -c, nsc_checkdrivesize, -a, 'Drive=%WINDOWS_DRIVE%:, %WINDOWS_DRIVE:1%, ShowAll=long'

l NSClient++.cpp(1195) No handler for command: 'check_nrpe'
No handler for command: check_nrpe

Can anyone offer any help please?, I'm getting frustrated for what seems like it should be a simple check...



smarsh's picture


You havent added the attribute 'WINDOWS_DRIVE' to your server. Edit the host, go to the attributes tab, and add a new one. An attribute is like a variable, so if you see %WINDOWS_DRIVE% in the service check, that means Opsview will substitute THAT with whatever you put in the attribute value.

So in your host, add an attribute of type WINDOWS_DRIVE and then set the value to the drive letter, i.e. 'C'. If you have more drive, click the expand icon against the attribute, and override the arguements, i.e. override arg1 and add 'D', etc to add more drives to be monitored.



youngy's picture
I just tried this out on a

I just tried this out on a Windows VM we have and it worked out as you described.