Re: Check file age problems
Posted: Wed Dec 16, 2015 4:13 am
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_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