[Nagios-users] Monitor Directory (Folders) Size with NSClient++

2012-03-07 Thread Jorge Pañeda
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
 image002.pngimage001.jpg--
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/___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] Monitor Directory (Folders) Size with NSClient++

2012-03-07 Thread Randal, Phil
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.ran...@hoopleltd.co.uk

From: Jorge Pañeda [mailto:jlpan...@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@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.comhttp://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.
inline: image002.pnginline: image003.jpg--
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/___
Nagios-users mailing list
Nagios-users@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