Hi Expert,
I'm new in this tool, I would just want to ask if possible to monitor or count how many files in the specific directory ex. c:\nagios.
Thanks
nsc command to count files in the directory
-
- Posts: 1
- Joined: Wed Mar 25, 2015 9:01 pm
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: nsc command to count files in the directory
Here is a plugin that does what you want:
http://exchange.nagios.org/directory/Pl ... nt/details
It doesn't really relate to the NSC product, I'm not sure how that relates... but this plugin will do what you ask and report back to Nagios.
http://exchange.nagios.org/directory/Pl ... nt/details
It doesn't really relate to the NSC product, I'm not sure how that relates... but this plugin will do what you ask and report back to Nagios.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: nsc command to count files in the directory
NSClient++ includes this capability:
Check the amount of files in a folder (and sub-folders). Generate a warning if more that 500 files exist, critical if more than 1000 files exist.
NSClient++ 0.3.9
NSClient++ 0.4.1
Check the amount of files in a folder (and sub-folders). Generate a warning if more that 500 files exist, critical if more than 1000 files exist.
NSClient++ 0.3.9
Code: Select all
Command:
check_nrpe -H 192.168.142.1 -t 30 -c CheckFiles -a path='C:\\NO BACKUP' pattern=*.* 'filter=size gt 0b' 'master-syntax={%total% Files Found}' MaxWarn=500 MaxCrit=1000
Output:
{12347 Files Found}, found files: 12347 > critical|'found files'=12347;500;1000
Code: Select all
Command:
check_nrpe -H 192.168.142.1 -t 30 -c CheckFiles -a path='C:\\NO BACKUP' pattern=*.* 'master-syntax={%total% Files Found}' MaxWarn=500 MaxCrit=1000
Output:
{12347 Files Found}, found files: 12347 > critical|'found files'=12347;500;1000
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.