Monitor Directory (Folders) Size with NSClient++

Randal, Phil phil.randal at hoopleltd.co.uk
Wed Mar 7 19:05:24 CET 2012


GetFileSize works for me using backslashes and not forward slashes.

Try using "\" or "\\" instead of "/" in the path.

e.g. d:\\Network Shares\\individual\\*.*

This might be a bug in NSClient++ and/or its documentation.

Cheers,

Phil

--
Phil Randal
Infrastructure Engineer
Hoople Ltd | Thorn Office Centre | Hereford HR2 6JT
Tel: 01432 260415 | Email: phil.randal at hoopleltd.co.uk

From: Jorge Pañeda [mailto:jlpaneda at sciodev.com]
Sent: 07 March 2012 16:49
To: 'Nagios Users List'
Subject: [Nagios-users] Monitor Directory (Folders) Size with NSClient++

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.

[cid:image002.png at 01CCFC8C.DE38D7F0]

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

[Description: Description: scio]

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<http://www.sciodev.com/>

"Any opinion expressed in this e-mail or any attached files are those of the individual and not necessarily those of Hoople Ltd. You should be aware that Hoople Ltd. monitors its email service. This e-mail and any attached files are confidential and intended solely for the use of the addressee. This communication may contain material protected by law from being passed on. If you are not the intended recipient and have received this e-mail in error, you are advised that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you have received this e-mail in error please contact the sender immediately and destroy all copies of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120307/6e272a04/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 12915 bytes
Desc: image002.png
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120307/6e272a04/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 3466 bytes
Desc: image003.jpg
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120307/6e272a04/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