Ticket #121 (closed defect: worksforme)
CheckFile doesn't return usable output
| Reported by: | cdavidson@… | Owned by: | MickeM |
|---|---|---|---|
| Priority: | 1 | Milestone: | |
| Component: | Core Module | Version: | 0.3.0 |
| Severity: | Bugs | Keywords: | |
| Cc: |
Description
I need to check the last access time of a file so was attempting to use the checkfile beta:
./check_nrpe -H 10.2.0.100 -c CheckFile -a filter=all filter=in MaxWarn=75% MaxCrit=85% file=c:\M360Root\assn\sais\DBSynchronization\DBSynchronization.log
CheckFile ok|=0;75;85;
Putting the filename in quotes or using escaped backslashes ("
") don't seem to work either.
Any suggestions on another way to do this would be very much appreciated!!
Change History
comment:2 Changed 4 years ago by anonymous
- Status changed from new to closed
- Resolution set to worksforme
sinc someone else is using this my guess it work, escaping in nagios work like froim a shell, if you enclose in "" then you need double
if you enclose in you dont ie:
"foo
bar", foo
bar and 'foo\bar' is all the same.
Note: See
TracTickets for help on using
tickets.








This is what we use to check that a Sybase backup file is less than 3 days old. I must admit to being a bit confused by the filter arguments, but this "works for us":
checkcommand.cfg -
define command { command_name nrpe_check_file_last_written command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckFile -a file="$ARG1$" filter-written=\>"$ARG2$" syntax="%filename% last updated %write% " MaxCrit=1 }service.cfg -