96 lines
2.3 KiB
Plaintext
96 lines
2.3 KiB
Plaintext
|
/*
|
||
|
* Generic template examples.
|
||
|
*/
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Provides default settings for hosts. By convention
|
||
|
* all hosts should import this template.
|
||
|
*
|
||
|
* The CheckCommand object `hostalive` is provided by
|
||
|
* the plugin check command templates.
|
||
|
* Check the documentation for details.
|
||
|
*/
|
||
|
template Host "generic-host" {
|
||
|
max_check_attempts = 5
|
||
|
check_interval = 2m
|
||
|
retry_interval = 1m
|
||
|
|
||
|
check_command = "hostalive"
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Provides default settings for services. By convention
|
||
|
* all services should import this template.
|
||
|
*/
|
||
|
template Service "generic-service" {
|
||
|
max_check_attempts = 5
|
||
|
check_interval = 2m
|
||
|
retry_interval = 1m
|
||
|
}
|
||
|
|
||
|
template Host "{{ icinga2_server_custom_hostgroup }}-host" {
|
||
|
import "generic-host"
|
||
|
|
||
|
vars.owner = "{{ icinga2_server_custom_hostgroup }}"
|
||
|
vars.notification["mail"] = {
|
||
|
groups = [ "{{ icinga2_server_custom_hostgroup }}" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Provides default settings for users. By convention
|
||
|
* all users should inherit from this template.
|
||
|
*/
|
||
|
|
||
|
template User "generic-user" {
|
||
|
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Provides default settings for host notifications.
|
||
|
* By convention all host notifications should import
|
||
|
* this template.
|
||
|
*/
|
||
|
template Notification "mail-host-notification" {
|
||
|
command = "mail-host-notification"
|
||
|
|
||
|
states = [ Up, Down ]
|
||
|
types = [ Problem, Acknowledgement, Recovery, Custom,
|
||
|
FlappingStart, FlappingEnd,
|
||
|
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
|
||
|
|
||
|
vars += {
|
||
|
// notification_icingaweb2url = "https://www.example.com/icingaweb2"
|
||
|
// notification_from = "Icinga 2 Host Monitoring <icinga@example.com>"
|
||
|
notification_logtosyslog = false
|
||
|
}
|
||
|
|
||
|
//period = "24x7"
|
||
|
period = "24x7minus4to5"
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Provides default settings for service notifications.
|
||
|
* By convention all service notifications should import
|
||
|
* this template.
|
||
|
*/
|
||
|
template Notification "mail-service-notification" {
|
||
|
command = "mail-service-notification"
|
||
|
|
||
|
states = [ OK, Warning, Critical, Unknown ]
|
||
|
types = [ Problem, Acknowledgement, Recovery, Custom,
|
||
|
FlappingStart, FlappingEnd,
|
||
|
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
|
||
|
|
||
|
vars += {
|
||
|
// notification_icingaweb2url = "https://www.example.com/icingaweb2"
|
||
|
// notification_from = "Icinga 2 Service Monitoring <icinga@example.com>"
|
||
|
notification_logtosyslog = false
|
||
|
}
|
||
|
|
||
|
//period = "24x7"
|
||
|
period = "24x7minus4to5"
|
||
|
}
|
||
|
|