Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_files_move.sh
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
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
Reviews (0)
Be the first to review this listing!