Nagios compliant health check for Automatron to determine disk usage
Simply copy the diskfree.py
script to the plugins/checks/
directory.
The diskfree
plugin is used to check the available space on a specified filesystem. If the available disk space is below the specified thresholds this script will exit indicating a WARNING
or CRITICAL
status.
- Linux
- Debian Base (Debian, Ubuntu, etc.)
- RedHat Base (RHEL, CentOS)
The below is an example of using the diskfree
health check in a runbook.
checks:
diskfree:
# Check for the % of disk free create warning with 20% free and critical for 10% free
execute_from: target
type: plugin
plugin: diskfree.py
args: --warn=20 --critical=10 --filesystem=/var/log
The diskfree
check requires 3 arguments.
args: --warn=<warning threshold %> --critical=<critical threshold %> --filesystem=<filesystem to check>