Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Check IO Wait (by Nestor@Toronto)
Current Version
1.0
Compatible With
- Nagios 3.x
Owner
Hits
5401
Files:
File | Description |
---|---|
check_iowait.sh | check_iowait.sh |
Help Support Ethan Galstad's New Project:
A Message From The Founder...
As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.
I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.
I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.
You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.
- Ethan
Script were written in BASH, tested on CentOS 6.X, Nagios 3.X
# Dependency: iostat
Reviews (1)
bytuathan, September 25, 2019
#!/bin/bash
if [ "$1" = "-w" ] && [ "$2" -gt "0" ] && [ "$3" = "-c" ] && [ "$4" -gt "0" ]; then
temp=`iostat|sed -n "4p"`
IFS= read -r -a array TIOWAIT" -ge "$INTCRIT" ]; then
echo "IO Wait: CRITICAL - $IOWAIT % |IOWAIT=$IOWAIT;;;;"
exit 2
elif [ "$INTIOWAIT" -ge "$INTWARN" ]; then
echo "IO Wait: WARNING - $IOWAIT % |IOWAIT=$IOWAIT;;;;"
exit 1
else
echo "IO Wait: OK - $IOWAIT % |IOWAIT=$IOWAIT;;;;"
exit 0
fi
else
echo "$0 v1.1"
echo ""
echo "Usage:"
echo "$0 -w -c "
echo ""
echo "warnlevel and critlevel is percentage value without %"
echo "
echo "EXAMPLE: /usr/lib64/nagios/plugins/check_iowait.sh -w 90 -c 95
echo ""
exit
fi
if [ "$1" = "-w" ] && [ "$2" -gt "0" ] && [ "$3" = "-c" ] && [ "$4" -gt "0" ]; then
temp=`iostat|sed -n "4p"`
IFS= read -r -a array TIOWAIT" -ge "$INTCRIT" ]; then
echo "IO Wait: CRITICAL - $IOWAIT % |IOWAIT=$IOWAIT;;;;"
exit 2
elif [ "$INTIOWAIT" -ge "$INTWARN" ]; then
echo "IO Wait: WARNING - $IOWAIT % |IOWAIT=$IOWAIT;;;;"
exit 1
else
echo "IO Wait: OK - $IOWAIT % |IOWAIT=$IOWAIT;;;;"
exit 0
fi
else
echo "$0 v1.1"
echo ""
echo "Usage:"
echo "$0 -w -c "
echo ""
echo "warnlevel and critlevel is percentage value without %"
echo "
echo "EXAMPLE: /usr/lib64/nagios/plugins/check_iowait.sh -w 90 -c 95
echo ""
exit
fi