Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Linux/Unix Check File Growth
2013-12-07
- Nagios 3.x
- Nagios 4.x
- Nagios XI
26280
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!
Also, check that a file is growing.
Tested on Linux, FreeBSD, OSX, and AIX.
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 Interval in seconds
-M Command to use for the checks
"wc/stat" wc is portable but slower, stat is faster but less portable
-T Type of concern for thresholds
"bigger/smaller" than thresholds
-c Critical threshold in bytes
-w 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
Also, check that a file is growing.
Options:
-f Specify filename as full path
-i
-M
"wc/stat" wc is portable but slower, stat is faster but less portable
-T
"bigger/smaller" than thresholds
-c
-w
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
Reviews (0)
Be the first to review this listing!