Monitor Directory (Folders) Size with NSClient++

Jorge Pañeda jlpaneda at sciodev.com
Wed Mar 7 17:48:39 CET 2012


Hello all, 
 
I’m using NSClient++ 0.3.9, nsca and passive checks to monitor my Windows server behind a firewall. In one of this servers I have  a folder that inside have many other folders and files, I want to monitor this folder and let Nagios send me a warning or critical notification when the size of this folder grows too much (Ex. Folder Size 50 GB, warning when is over 70 GB and critical when is over 80 GB). 
 
I tried to accomplish this using CheckFileSize and CheckDriveSize but not succeeded at all. 
 
When I use CheckFileSize like this: 
 
alias_individual=CheckFileSize ShowAll MaxWarn=60G MaxCrit=70G "File:_Individual=d:/Network Shares/individual/*.*"
 
I got that the result is ok but 0 Bytes. I even got the same result if I eliminate the *.* at the end of the path. 
 

 
When CheckDriveSize is used:
 
alias_individual=CheckDriveSize MaxWarn=60G MaxCrit=70G ShowAll=long "Drive=\\servername\\individual"
 
I got the size but this size is the size of all the Hard Disk and not the size of the folder. 
 
Hope you can help me to solve this issue or give any ideas to accomplish the monitoring of size folders. 
 
Thanks in advance. 
 
Jorge L. Pañeda
 

 
Systems Administrator
Scio Consulting | IT & Infrastructure Dept.
Las Cañadas 501 Int. 230 Col. Tres Marías 
Morelia, Mich., México Tel. (443) 310-96-01 y (443) 310-96-02 ext. 402
U.S. Phone: 408 404 3897 Ext. 402
www.sciodev.com
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120307/fc0ab362/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 12915 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120307/fc0ab362/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3466 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120307/fc0ab362/attachment.jpg>
-------------- next part --------------
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list