Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_disk_space
0.93
2014-10-31
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
GPL
64216
File | Description |
---|---|
check_disk_space | check_disk_space ver. 0.93 |
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!
- total disk space on the partition (in Bytes)
- currently used disk space (in Bytes and in %)
- free disk space (in Bytes and in %)
check_disk_space is written in Bash and uses df, grep and awk - no Perl, no PHP, no SNMP. This ensures that it is able to run on minimal systems, with few packages installed, and it is compatible with UNIX, Linux and BSD.
The thresholds for warning and critical may be specified as integer or float numbers.
Performance data:
- used disk space (Bytes)
- used disk space (%)
Performance data is reported in bytes instead of MB (GB, TerraBytes etc.) because the performance data is supposed to be processed by the monitoring tool (e.g. Nagios or Centreon) which should scale the graph accordingly and apply the correct multiplier.
Performance data complies to Nagios standards and has min/max values and warning/critical thresholds.
Usage:
check_disk_space [-v] [-h] [-w UsedSpaceWarning] [-c UsedSpaceCritical] [-p Partition]
Options:
--version|-v)
prints the program version
--help|-h)
prints this help information
-w)
warning threshold (in percents without % sign) for used space
-c)
critical threshold (in percents without % sign) for used space
-p)
disk partition to check
Example:
# ./check_disk_space -w 1 -c 90 -p /var
Warning; /var: total 1007.9MB, used 115.0MB (11.4%>1%), free 841.7MB (83.5%) | 'used space'=120590336B;10568581;951172300;0;1056858112 'used space (pct.)'=11.4%;1;90;0;100
=============
Oct. 31, 2014 What's new in version 0.93
- improved error detection. The script exits gracefully if the partition does not exist or it can not be checked or if you simply forget to provide it as an argument.
- the path for binary executables is no more hard coded, which makes the script capable to run on virtually any Linux or UNIX system, without the need to edit it.
- the path for binary executables (grep, awk, free) can be overwritten in the parameters section, at the beginning of the script
- introduced a new function for bringing the size strings to humanly readable format (ex.: 1024 bytes=>1KB)
The thresholds for warning and critical may be specified as integer or float numbers.
Performance data:
- used disk space (Bytes)
- used disk space (%)
Performance data is reported in bytes instead of MB (GB, TerraBytes etc.) because the performance data is supposed to be processed by the monitoring tool (e.g. Nagios or Centreon) which should scale the graph accordingly and apply the correct multiplier.
Performance data complies to Nagios standards and has min/max values and warning/critical thresholds.
Usage:
check_disk_space [-v] [-h] [-w UsedSpaceWarning] [-c UsedSpaceCritical] [-p Partition]
Options:
--version|-v)
prints the program version
--help|-h)
prints this help information
-w)
warning threshold (in percents without % sign) for used space
-c)
critical threshold (in percents without % sign) for used space
-p)
disk partition to check
Example:
# ./check_disk_space -w 1 -c 90 -p /var
Warning; /var: total 1007.9MB, used 115.0MB (11.4%>1%), free 841.7MB (83.5%) | 'used space'=120590336B;10568581;951172300;0;1056858112 'used space (pct.)'=11.4%;1;90;0;100
=============
Oct. 31, 2014 What's new in version 0.93
- improved error detection. The script exits gracefully if the partition does not exist or it can not be checked or if you simply forget to provide it as an argument.
- the path for binary executables is no more hard coded, which makes the script capable to run on virtually any Linux or UNIX system, without the need to edit it.
- the path for binary executables (grep, awk, free) can be overwritten in the parameters section, at the beginning of the script
- introduced a new function for bringing the size strings to humanly readable format (ex.: 1024 bytes=>1KB)
Reviews (0)
Be the first to review this listing!