Hello XI support
How we could count number of files and files sizes VS XI warnings and alerts.
- for Windows 2008=2012 with NSClient installed
Thank you
File sizes and counts in the folder
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: File sizes and counts in the folder
Hello, @dlukinski.
We could use some clarification on this one. You want to count files, and measure the sizes and have alerts if some threshold is reached? Is that correct?
Here's an example of the command to use with NSClient to count number of files in some directory:
We could use some clarification on this one. You want to count files, and measure the sizes and have alerts if some threshold is reached? Is that correct?
Here's an example of the command to use with NSClient to count number of files in some directory:
Code: Select all
./check_nrpe -H 192.168.4.49 -t 30 -c check_files -a path='C:\\your_path' pattern=*.* 'warning=count>500' 'critical=count>1000' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: File sizes and counts in the folder
Thank you so much - was a problem we could not get working for ages (together with XI support)!npolovenko wrote:Hello, @dlukinski.
We could use some clarification on this one. You want to count files, and measure the sizes and have alerts if some threshold is reached? Is that correct?
Here's an example of the command to use with NSClient to count number of files in some directory:Code: Select all
./check_nrpe -H 192.168.4.49 -t 30 -c check_files -a path='C:\\your_path' pattern=*.* 'warning=count>500' 'critical=count>1000' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
- please help with 2 more things: file size and folder size command syntax
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: File sizes and counts in the folder
@dlukinski, Glad I could help!
This will show all files with a size greater then 100 megabytes under a Critical output.
Check out this article, there are a few examples: https://support.nagios.com/kb/article/f ... s-783.html
Code: Select all
./check_nrpe -H 192.168.4.49 -c check_files -a path=’C:\\your_path\\path\\path’ pattern=*.* ’filter=size gt 100M’ ’warn= count > 0’ ’crit= count > 0’ top-syntax=’${status}: ${count} files found ${problem_list}’ ’empty-state=ok’Check out this article, there are a few examples: https://support.nagios.com/kb/article/f ... s-783.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: File sizes and counts in the folder
Thank you so much, please closenpolovenko wrote:@dlukinski, Glad I could help!This will show all files with a size greater then 100 megabytes under a Critical output.Code: Select all
./check_nrpe -H 192.168.4.49 -c check_files -a path=’C:\\your_path\\path\\path’ pattern=*.* ’filter=size gt 100M’ ’warn= count > 0’ ’crit= count > 0’ top-syntax=’${status}: ${count} files found ${problem_list}’ ’empty-state=ok’
Check out this article, there are a few examples: https://support.nagios.com/kb/article/f ... s-783.html
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: File sizes and counts in the folder
@dlukinski, You're welcome! Closing this thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.