Created
February 8, 2010 11:31
-
-
Save craigw/298069 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
# A Nagios service check skeleton. | |
# | |
# Note that you can put more than one line of output in the message, | |
# and you can include check performance data if you'd like. | |
# | |
# Technical details here: | |
# http://nagios.sourceforge.net/docs/3_0/pluginapi.html | |
# | |
if okay? | |
puts "SERVICE_NAME OKAY: It's all good" | |
exit 0 | |
elsif warning? | |
puts "SERVICE_NAME WARNING: I'm a bit worried by something" | |
exit 1 | |
elsif critical? | |
puts "SERVICE_NAME CRITICAL: OH NOES! PANIC!" | |
exit 2 | |
else # unknown | |
puts "SERVICE_NAME UNKNOWN: I couldn't work out the status of the service" | |
exit 3 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment