check_file_age help

Jeremy Page jeremy.page at gilbarco.com
Mon Jul 30 18:57:21 CEST 2012


Hello list, I am trying to use check_file_age on Ubuntu 10.04 to check a
local file system. When I specify the file name it works but using a
wildcard fails saying it cannot find the file. I need to use the
wildcard - the files have unique names based on the date created.

Both work when run interactively from the command line as the Nagios
service.

My check command is:
define command {
    command_name        check_file_age_v1
    command_line        $USER1$/check_file_age -w $ARG1$ -c $ARG2$ -f $ARG3$
    }

The service command is:

Works:
define service{
    host_name                 host.company.com
    service_description    backup check - Is the file new in the past 24
hours
    check_command       
check_file_age_v1!86400!172800!/stuff/backup/2012-07-30-02-01-30_backup.xml
    use            generic-service
    }

Does not work:
define service{
    host_name        host.company.com
    service_description    backup check - Is the file new in the past 24
hours
    check_command        check_file_age_v1!86400!172800!/stuff/backup/*
    use            generic-service
    }



Please be advised that this email may contain confidential 
information.  If you are not the intended recipient, please notify us 
by email by replying to the sender and delete this message.  The 
sender disclaims that the content of this email constitutes an offer 
to enter into, or the acceptance of, any agreement; provided that the 
foregoing does not invalidate the binding effect of any digital or 
other electronic reproduction of a manual signature that is included 
in any attachment.



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list