1/* 2 * Generic template examples. 3 */ 4 5 6/** 7 * Provides default settings for hosts. By convention 8 * all hosts should import this template. 9 * 10 * The CheckCommand object `hostalive` is provided by 11 * the plugin check command templates. 12 * Check the documentation for details. 13 */ 14template Host "generic-host" { 15 max_check_attempts = 3 16 check_interval = 1m 17 retry_interval = 30s 18 19 check_command = "hostalive" 20} 21 22/** 23 * Provides default settings for services. By convention 24 * all services should import this template. 25 */ 26template Service "generic-service" { 27 max_check_attempts = 5 28 check_interval = 1m 29 retry_interval = 30s 30} 31 32/** 33 * Provides default settings for users. By convention 34 * all users should inherit from this template. 35 */ 36 37template User "generic-user" { 38 39} 40 41/** 42 * Provides default settings for host notifications. 43 * By convention all host notifications should import 44 * this template. 45 */ 46template Notification "mail-host-notification" { 47 command = "mail-host-notification" 48 49 states = [ Up, Down ] 50 types = [ Problem, Acknowledgement, Recovery, Custom, 51 FlappingStart, FlappingEnd, 52 DowntimeStart, DowntimeEnd, DowntimeRemoved ] 53 54 vars += { 55 // notification_icingaweb2url = "https://www.example.com/icingaweb2" 56 // notification_from = "Icinga 2 Host Monitoring <icinga@example.com>" 57 notification_logtosyslog = false 58 } 59 60 period = "24x7" 61} 62 63/** 64 * Provides default settings for service notifications. 65 * By convention all service notifications should import 66 * this template. 67 */ 68template Notification "mail-service-notification" { 69 command = "mail-service-notification" 70 71 states = [ OK, Warning, Critical, Unknown ] 72 types = [ Problem, Acknowledgement, Recovery, Custom, 73 FlappingStart, FlappingEnd, 74 DowntimeStart, DowntimeEnd, DowntimeRemoved ] 75 76 vars += { 77 // notification_icingaweb2url = "https://www.example.com/icingaweb2" 78 // notification_from = "Icinga 2 Service Monitoring <icinga@example.com>" 79 notification_logtosyslog = false 80 } 81 82 period = "24x7" 83} 84