Skip to content

Instantly share code, notes, and snippets.

@kuleszaj
Created November 24, 2010 20:22
Show Gist options
  • Save kuleszaj/714333 to your computer and use it in GitHub Desktop.
Save kuleszaj/714333 to your computer and use it in GitHub Desktop.
Sample configuration code to check host availability (using ping) with Nagios.
# Define our host
define host{
use linux-server
host_name someserver.local
alias someserver.local
address 192.168.1.1
}
# Define ping service parameters warning at 100ms response time and 20% packet loss
# and failure at 500ms response time and 60% packet loss
define service{
use generic-service
host_name infmgt.sme.loc
service_description ping
check_command check_ping!100.0,20%!500.0,60%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment