Skip to content

Instantly share code, notes, and snippets.

@colorfield
Created June 1, 2017 09:52
Show Gist options
  • Save colorfield/f52878ff0b448c64a8ccbbbd91dd3f8c to your computer and use it in GitHub Desktop.
Save colorfield/f52878ff0b448c64a8ccbbbd91dd3f8c to your computer and use it in GitHub Desktop.
Nagios host configuration template
define host {
use linux-server
host_name vpsxxx.xx.xx # replace
alias vpsxxx # replace
address 127.0.0.1 # replace
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service {
use generic-service
host_name vpsxxx.xx.xx # replace
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
define service {
use generic-service
host_name vpsxxx.xx.xx # replace
service_description SSH
check_command check_ssh
notifications_enabled 0
}
define service {
use generic-service
host_name vpsxxx.xx.xx # replace
service_description HTTP
check_command check_http
notifications_enabled 1
}
define service{
use generic-service
host_name vpsxxx.xx.xx # replace
service_description Swap Usage
check_command check_local_swap!20!10
}
define service{
use generic-service
host_name vpsxxx.xx.xx # replace
service_description Current Load
check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
}
define service{
use generic-service
host_name vpsxxx.xx.xx # replace
service_description Root Partition
check_command check_local_disk!20%!10%!/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment