Page 2 of 2

Re: Check file age problems

Posted: Wed Dec 16, 2015 4:13 am
by kaiserclaw
Well.. When typing the whole thing again it works.. kind of..

check_nrpe -H 192.168.1.11 -t 30 -c CheckFiles -a path='C:\\logs\\' pattern='test.log' 'filter=written < -10m' MaxCrit=1
Result code: 0
CheckFile ok|'found files'=0;0;1

If I don't edit the log file in 10 min it still says OK, if i set 1 min = OK. It should warn/critical if the file has'nt been modified/written in 10 min.
If I remove the file (test.log) it still says OK! Is there a way specify a file instead of path? I tried replace "path" with "file" -> file='C:\\logs\\test.log' but I got an error: Result code: 3 Check contains error

Re: Check file age problems

Posted: Wed Dec 16, 2015 5:32 am
by kaiserclaw
Well... after some adjustments in .ini files and enabled:

port=5666
allow_arguments=1
allow_nasty_meta_chars=1
use_ssl=1

I got:

check_nrpe -H 192.168.1.11 -t 30 -c checkfiles -a path='C:\\logs\\' pattern='test.log' 'filter=written < -10m' MaxCrit=1

Result code: 3
UNKNOWN: No handler for that command

Re: Check file age problems

Posted: Wed Dec 16, 2015 8:14 am
by kaiserclaw
Finally I got it to work!

Tried another computer and it works!! Updated the client on the machine the command didn't work on and now it works!
Seems like an outdated version!


Thank you for all help!

Re: Check file age problems

Posted: Wed Dec 16, 2015 10:35 am
by hsmith
Glad to hear it you got it in our off hours! Would you like me to close this topic?

Re: Check file age problems

Posted: Thu Dec 17, 2015 2:27 am
by kaiserclaw
hsmith wrote:Glad to hear it you got it in our off hours! Would you like me to close this topic?
Thank you!
I don't know - does it mean no one can borrow this thread and comment if they have similar problems?

Re: Check file age problems

Posted: Thu Dec 17, 2015 10:29 am
by hsmith
I can leave it open, just please don't respond unless there are further issues. We use a dashboard here, so it'll look like you're still having a problem if a Nagios employee isn't the last poster. Thanks!