Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_temp_wget
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!
#!/bin/bash
WARNING_LEVEL_TEMP=80
CRITICAL_LEVEL_TEMP=85
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
# assumed usage:
# ./check_temp.sh http://somewhere.com
URL=$1
temp=$(wget $URL -q -O -)
echo "Temperature: $temp"
# Example:
# if [ $content -gt 80 ] && [ $content -lt 60 ]
# then
# echo "less then 80"
# fi
if [ $temp -ge $CRITICAL_LEVEL_TEMP ]
then
exit $STATE_CRITICAL;
elif [ $temp -ge $WARNING_LEVEL_TEMP ]
then
exit $STATE_WARNING;
else
exit $STATE_OK;
fi
WARNING_LEVEL_TEMP=80
CRITICAL_LEVEL_TEMP=85
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
# assumed usage:
# ./check_temp.sh http://somewhere.com
URL=$1
temp=$(wget $URL -q -O -)
echo "Temperature: $temp"
# Example:
# if [ $content -gt 80 ] && [ $content -lt 60 ]
# then
# echo "less then 80"
# fi
if [ $temp -ge $CRITICAL_LEVEL_TEMP ]
then
exit $STATE_CRITICAL;
elif [ $temp -ge $WARNING_LEVEL_TEMP ]
then
exit $STATE_WARNING;
else
exit $STATE_OK;
fi
Reviews (0)
Be the first to review this listing!