check_nrpe check_files count < 10 not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bucher_nagios
Posts: 4
Joined: Wed Nov 08, 2017 3:49 am

check_nrpe check_files count < 10 not working

Post by bucher_nagios »

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
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: check_nrpe check_files count < 10 not working

Post by mbellerue »

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?
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!
Locked