scripted in bash for easy reusing
$ cat my-hostprefix-clu-host-GEN.cfg my-hostprefix--clu-services-GEN.cfg my-hostprefix-clu-deps-GEN.cfg
define host {
host_name my-hostprefix-X-clu
alias my-hostprefix-X-clu
address 127.0.0.1
use generic-host
}
define service {
use SYSMON-MIT-HA
host_name my-hostprefix-X-clu
service_description CLU:sys:cluster
check_command check_service_cluster!"sys:cluster"!0!7!$SERVICESTATEID:my-hostprefix-1.domain.xxx:sys:cluster$,$SERVICESTATEID:my-hostprefix-2.domain.xxx:sys:cluster$,$SERVICESTATEID:my-hostprefix-3.domain.xxx:sys:cluster$,$SERVICESTATEID:my-hostprefix-4.domain.xxx:sys:cluster$,$SERVICESTATEID:my-hostprefix-5.domain.xxx:sys:cluster$,$SERVICESTATEID:my-hostprefix-6.domain.xxx:sys:cluster$,$SERVICESTATEID:my-hostprefix-7.domain.xxx:sys:cluster$,$SERVICESTATEID:my-hostprefix-8.domain.xxx:sys:cluster$
max_check_attempts 1
}
define service {
use SYSMON-MIT-HA
host_name my-hostprefix-X-clu
service_description CLU:sys:libvirt-cross
check_command check_service_cluster!"sys:libvirt-cross"!0!7!$SERVICESTATEID:my-hostprefix-1.domain.xxx:sys:libvirt-cross$,$SERVICESTATEID:my-hostprefix-2.domain.xxx:sys:libvirt-cross$,$SERVICESTATEID:my-hostprefix-3.domain.xxx:sys:libvirt-cross$,$SERVICESTATEID:my-hostprefix-4.domain.xxx:sys:libvirt-cross$,$SERVICESTATEID:my-hostprefix-5.domain.xxx:sys:libvirt-cross$,$SERVICESTATEID:my-hostprefix-6.domain.xxx:sys:libvirt-cross$,$SERVICESTATEID:my-hostprefix-7.domain.xxx:sys:libvirt-cross$,$SERVICESTATEID:my-hostprefix-8.domain.xxx:sys:libvirt-cross$
max_check_attempts 1
}
define servicedependency{
host_name my-hostprefix-X-clu
service_description CLU:sys:cluster
dependent_host_name my-hostprefix-1.domain.xxx
dependent_service_description sys:cluster
execution_failure_criteria c
notification_failure_criteria c
}
define servicedependency{
host_name my-hostprefix-X-clu
service_description CLU:sys:cluster
dependent_host_name my-hostprefix-2.domain.xxx
dependent_service_description sys:cluster
execution_failure_criteria c
notification_failure_criteria c
}
...
define servicedependency{
host_name my-hostprefix-X-clu
service_description CLU:sys:libvirt-cross
dependent_host_name my-hostprefix-8.domain.xxx
dependent_service_description sys:libvirt-cross
execution_failure_criteria c
notification_failure_criteria c
}