Check file age problems

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
kaiserclaw
Posts: 15
Joined: Thu Dec 10, 2015 5:30 am

Re: Check file age problems

Post 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
kaiserclaw
Posts: 15
Joined: Thu Dec 10, 2015 5:30 am

Re: Check file age problems

Post 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
kaiserclaw
Posts: 15
Joined: Thu Dec 10, 2015 5:30 am

Re: Check file age problems

Post 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!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Check file age problems

Post by hsmith »

Glad to hear it you got it in our off hours! Would you like me to close this topic?
Former Nagios Employee.
me.
kaiserclaw
Posts: 15
Joined: Thu Dec 10, 2015 5:30 am

Re: Check file age problems

Post 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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Check file age problems

Post 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!
Former Nagios Employee.
me.
Locked