Page 2 of 2
Re: Argument for check_files
Posted: Fri Apr 15, 2016 2:02 am
by cocoyanouck
Ok, I have delete all the files on my directory and tested it again. The code :
http://hpics.li/9d19177
Re: Argument for check_files
Posted: Fri Apr 15, 2016 11:05 am
by rkennedy
Looks good, you'll want to modify your service's check_command's accordingly now. It's exiting properly, so it shouldn't show as unknown.
Re: Argument for check_files
Posted: Fri Apr 15, 2016 12:28 pm
by cocoyanouck
I've already wrote these command and the output on web interface is the same that on the output of the nagios-debian => notification by email because "status unknown" and in description "no files found" (when 0 files in this directory.
Idem with 0.50 and 0.4.4. Very strange !
Re: Argument for check_files
Posted: Fri Apr 15, 2016 12:48 pm
by rkennedy
This is bizarre, can you post the new service definition that you're using now?
Also, please post the command definition for check_nrpe.
I'll try to replicate things on my end once I have that information.
Re: Argument for check_files
Posted: Sat Apr 16, 2016 1:49 am
by cocoyanouck
For sure :
Define service in windows.cfg :
http://hpics.li/a6e4457
NRPE in command.cfg :
http://hpics.li/2dc593f
Re: Argument for check_files
Posted: Mon Apr 18, 2016 11:54 am
by lmiltchev
I noticed some inconsistencies with the output from the CLI ("OK"), and the one in the web UI ("UNKNOWN") too.
Try changing this:
Code: Select all
check_nrpe!check_files!path='c:\\GESTION\\REQUEST' pattern=*.* 'warning=count>5' 'critical=count>10' top-syntax='${status}:${problem_count}/${count} files' 'empty-state=ok'
to this:
Code: Select all
check_nrpe!check_files!path='c:\\GESTION\\REQUEST' pattern=*.* 'warning=count>5' 'critical=count>10' 'empty-state=ok' top-syntax='${status}:${problem_count}/${count} files'
This seems like a useless mod, but it worked for me...
BTW, I didn't use double backward slashes in my path, i.e. path='c:\temp'. I am not sure if this is going to make any difference.
Let us know if this helped.
Re: Argument for check_files
Posted: Tue Apr 19, 2016 1:34 am
by cocoyanouck
Ok, thanks a lot, I come back from holidays next monday and I'll try this !!!
Re: Argument for check_files
Posted: Tue Apr 19, 2016 9:36 am
by rkennedy
Sounds good - enjoy your time off!
Re: Argument for check_files
Posted: Mon Apr 25, 2016 4:30 am
by cocoyanouck
This is awesome, it's Ok when I write this :
Code: Select all
check_nrpe!check_files!path='c:\\GESTION\\REQUEST' pattern=*.* 'warning=count>5' 'critical=count>10' 'empty-state=ok' top-syntax='${status}:${problem_count}/${count} files'
You can put this topic to "RESOLVE" and I want to thank you warmly !
Re: Argument for check_files
Posted: Mon Apr 25, 2016 10:23 am
by rkennedy
Great to hear! Marking this as resolved and closing it out.