Dear Community,
we are trying to implement a new check_nrpe in our Nagios XI environment to check if a folder has less than 10 files inside.
This is important to know if a system is correctly running after a planned reboot with cleanup of that specific folder.
To do this we use the Check command "check_nrpe" like this
Command View:
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
$ARG1$ = check_files
$ARG2$ = ./check_nrpe -a path='D:\\JDEdwardsPPack\\E920\\log' 'warn= count < 20' 'crit= count < 10' top-syntax='${status}: ${count} files found ${problem_list}' 'empty-state=critical' show-all
The problem we have is that if I set the threshold like above it always says status critical also if there are 50 files inside which in my opinion is not correct?!
Thanks for your help and kind regards,
Christian
check_nrpe check_files count < 10 not working
-
bucher_nagios
- Posts: 4
- Joined: Wed Nov 08, 2017 3:49 am
Re: check_nrpe check_files count < 10 not working
I was able to take your example command and it would report OK, WARNING, and CRITICAL based on the number of files and threshold set. Are you getting the full list of files returned by the command when it runs?
Were there more than 20 files in the directory when you created the check? If so, did the check report OK at that point?
Were there more than 20 files in the directory when you created the check? If so, did the check report OK at that point?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!