Ticket #121 (closed defect: worksforme)

Opened 4 years ago

Last modified 7 months ago

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:1 Changed 4 years ago by anonymous

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 -

        check_command                   nrpe_check_file_last_written!"E:\\pnbackup\\Olympus.DB"!3d

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.

comment:3 Changed 7 months ago by mickem

  • Version changed from 0.3.0-RC to 0.3.0
Note: See TracTickets for help on using tickets.