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_files_move.sh

Current Version
1.0
Last Release Date
2011-02-07
Compatible With
  • Nagios 3.x
License
GPL
Hits
93501
Files:
FileDescription
check_files_move.shcheck_files_move.sh
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
A simple plugin for nagios that will check a directory to make sure files are moving out.
This plugin is used to make sure files are getting moved out of a directory.

It does not check to make sure there are no more than x number of files in a folder (there's plenty already that do that), Instead it keeps a list of the files it found last time, and if any are the same the next time it runs an error is raised.

It is very simple to run, you call the script with a path you want to check, and the name you want to give the job, like so:

./check_files_move.sh -d path -n job name

the -n option is used to create the file that holds list of files found in the directory.

This file is written into the /usr/local/nagios/libexec/ directory, so you need to make sure the nagios service has write/delete access into that folder.

The first time the script runs it just writes the file list out, the next time it runs it checks the current files against the onces in the jobname.pre file. The jobname.pre file is then overriden with the new folder contents

At the moment the plugin does not re-curse folders, or give you the option to set warning/critical levels based on the number of matching files. If enough people ask for it I will add that functionality as well.

Any feedback please let me know