File System

Check IO Wait (by Nestor@Toronto)

Description:

Check IO Wait for Linux. Return IO wait in percentage

Script were written in BASH, tested on CentOS 6.X, Nagios 3.X

# Dependency: iostat

Current Version

1.0

Last Release Date

August 21, 2015

Compatible With

  • Nagios 3.x

Owner


Nagios CSP

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!
Project Files
Project Notes
Reviews (1) Add a Review
Thanks - made a few edits
by tuathan, September 30, 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
Helpful? Yes  No 
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4 (2)
Favorites
0
Views
11,103