Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Shell script that checks the level of byte growth of a file for a time interval. Also, check that a file is growing. Tested on Linux, FreeBSD, OSX, and AIX.
Current Version
Last Release Date
2013-12-07
Owner
Jon Schipp
Download URL
https://github.com/jonschipp/nagios-plugins/blob/master/check_file_growth.sh
Compatible With
Check the level of byte growth of a file for a time interval. Also, check that a file is growing.
Options: -f Specify filename as full path -i <int> Interval in seconds -M <command> Command to use for the checks "wc/stat" wc is portable but slower, stat is faster but less portable -T <type> Type of concern for thresholds "bigger/smaller" than thresholds -c <int> Critical threshold in bytes -w <int> Warning threshold in bytes
Usage: $0 -f big.log -M stat -T bigger -c 1000000 -w 5000000 -i 30
# Author: Jon Schipp # Date: 11-07-2013 ######## # Examples:
# 1.) Check if file has grown in the last 30 seconds # $ ./check_file_growth.sh -f /var/log/system.log -M stat -i 30 # File grew by 118 bytes # # 2.) If file has grown by more than (c)ritical or (w)arning bytes in 30 seconds exit with critical or warning status. Use the stat program to check the bytes. # $ ./check_file_growth -f big.log -M stat -T bigger -c 1000000 -w 5000000 -i 30
You must be logged in to submit a review.
To:
From: