Others

check_temp_wget

Description:

Basically, I couldn’t find any plugins that would take characters (numbers) from a web page and then translate that into a plugin that would work within nagios. I decided to create this simple bash script to get the information (simple wget command) from the IP address to Nagios. Feel free to use and change however you would like.

Current Version

1.0

Last Release Date

2017-03-05

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x

Project Notes
#!/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
Reviews (0) Add a Review
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
0 (0)
Favorites
0
Views
6,707