thehunmonkgroup / nagios-plugin-file-ages-in-dirs Goto Github PK
View Code? Open in Web Editor NEWNagios plugin, pulls all files in each specified directory, and checks their created time against the current time.
License: MIT License
Nagios plugin, pulls all files in each specified directory, and checks their created time against the current time.
License: MIT License
Can this script check files in a sub-folders ? I have a backup server under linux but after the backup path the system creates random folder (like 017ac7de-0c21-3bd3-a30c-8c217c3e62f3) and then dates. I did /path/to/folder/* but I'm not sure if this is working.
Is there anyway to check paths which have a space in them? I tried with \ and \ but no luck.
let is a bash built in, and the shebang points at /bin/sh -- any OS that doesn't resolve /bin/sh to bash will not work.
solution is to get rid of let and use arithmetic expansion: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_04
Hi,
I tried this script without any arguments (only -d was given). Everytime I run this script I got an error, it doesn't matter how many files there were in this directory:
... and so on :)
I am using a bash with Ubuntu 15.10. Do you need something more?
Thanks in advance!
Hi, can you make it compatible with solaris ?
I have already worked on it, but i'm not a specialist.
For example, i had to modify :
#CURRENT_TIME=date +%s
CURRENT_TIME=nawk "BEGIN{print srand}"
#file_list=find $full_path -mindepth 1 -maxdepth 1 $file_types $ignore | sort
file_list=find $full_path $file_types $ignore | sort
#if [ "$OS_DISTRO" = "Linux" ]; then
#st_ctime=stat -c%Y ${next_filepath}
if [ "$OS_DISTRO" = "SunOS" ]; then
st_ctime=perl -e'print ((stat("${next_filepath}"))[9]);'
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.