Created
February 13, 2015 01:23
-
-
Save Unitech/152b8ef7e7abcb42806c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log_facility=daemon | |
| pid_file=/var/run/nagios/nrpe.pid | |
| server_port=5666 | |
| nrpe_user=nrpe | |
| nrpe_group=nrpe | |
| allowed_hosts=198.211.117.251 | |
| dont_blame_nrpe=1 | |
| debug=0 | |
| command_timeout=60 | |
| connection_timeout=300 | |
| include_dir=/etc/nagios/nrpe.d/ | |
| command[usedspace_bash]=/usr/lib/nagios/plugins/usedspace.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| used_space=`df -h / | grep -v Filesystem | awk '{print $5}' | sed 's/%//g'` | |
| case $used_space in | |
| [1-84]*) | |
| echo "OK - $used_space% of disk space used." | |
| exit 0 | |
| ;; | |
| [85]*) | |
| echo "WARNING - $used_space% of disk space used." | |
| exit 1 | |
| ;; | |
| [86-100]*) | |
| echo "CRITICAL - $used_space% of disk space used." | |
| exit 2 | |
| ;; | |
| *) | |
| echo "UNKNOWN - $used_space% of disk space used." | |
| exit 3 | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment