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
Check file age problems
-
kaiserclaw
- Posts: 15
- Joined: Thu Dec 10, 2015 5:30 am
Re: Check file age problems
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
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
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!
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
Glad to hear it you got it in our off hours! Would you like me to close this topic?
Former Nagios Employee.
me.
me.
-
kaiserclaw
- Posts: 15
- Joined: Thu Dec 10, 2015 5:30 am
Re: Check file age problems
Thank you!hsmith wrote:Glad to hear it you got it in our off hours! Would you like me to close this topic?
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
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.
me.