Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_file_exists_glob

Rating
2 votes
Favoured:
0
Current Version
0.11
Last Release Date
2015-07-23
Compatible With
  • Nagios 3.x
  • Nagios 4.x
Hits
43601
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
check_file_exists_glob
Check for existence or non-existence of a file or files - using glob patterns.
$ ./check_file_exists_glob -h

check_file_exists_glob - Alert if a FILE does not exist.

Usage: check_file_exists_glob [options] -d DIR FILE

 FILE    :  The file to search for. Can glob using '*' etc, but
            place file names with glob patterns within quotes.
            Mandatory. The FILE must always be specified.
 -d DIR  :  Base directory to search in.
            Mandatory option - the DIR must always be specified.
 -i      :  Invert FILE, so alert if FILE does exist.
 -I      :  Alert if DIR does not exist.
 -p      :  Add performance data output for graphing.
 -w NUM  :  Warning alert if >=NUM files are found and invert
            files '-i' is on. (Default is: 1)
 -c NUM  :  Critical alert if >=NUM files are found and invert
            files '-i' is on. (Default is: 1)
 -h      :  Display this help text.

Example:

  Check that /tmp/dir/file exists.

    ./check_file_exists_glob -d /tmp/dir file

  Check that /tmp/dir/file does NOT exist.

    ./check_file_exists_glob -d /tmp/dir -i file

  Again check that /tmp/dir/file does NOT exist but this time alert
  if the directory it could be found in, /tmp/dir, is missing.

    ./check_file_exists_glob -d /tmp -i -I file

  Check for files matching the glob 'fi*' and alert if found in
  /tmp/dir. Alert if /tmp/dir does not exist. Provide performance
  data for graphing, showing the number of files matching the
  glob pattern.

    ./check_file_exists_glob -d /tmp/dir -i -I -p "fi*"

  Same as previous but only alert if thresholds are exceeded. In
  this case issue a warning alert when there are 20 or more files
  found, critical for 30 or more.

    ./check_file_exists_glob -d /tmp/dir -i -I -p -w 20 -c 30 "fi*"

Reviews (1)
bymuhalb, July 22, 2018
Is there anyway we can make it to check a web link to see if you the file download exist?