icinga2
icinga2 copied to clipboard
Issue with icinga health check
Hi,
i've a problem with cluster-zone check on my icinga master.
Result for cluster-zone on master is: Zone 'master' is not connected. Log lag: less than 1 millisecond
My master is UP. I've one master, and many zones and satellites.
My config is:
/etc/icinga2/zones.d/global-templates/icinga-services.conf:
apply Service "icinga-cluster-zone-health" {
// object attributes
check_interval = 1m
retry_interval = 30s
check_command = "cluster-zone"
display_name = "Icinga zone health"
name = "icinga-cluster-zone-health"
// vars
vars.cluster_zone = host.zone
// assignment rules
assign where "icinga-cluster-zone-health" in host.vars.services
}
apply Service "icinga-zone-connectivity" {
// object attributes
max_check_attempts = 5
check_interval = 1m
retry_interval = 30s
check_command = "cluster"
display_name = "Icinga zone connectivity"
name = "icinga-zone-connectivity"
// vars
vars.cluster_zone = host.zone
// assignment rules
assign where "icinga-zone-connectivity" in host.vars.services
}
apply Service "icinga-health" {
// object attributes
check_interval = 1m
retry_interval = 30s
check_command = "icinga"
display_name = "Icinga health"
name = "icinga-health"
assign where "icinga-health" in host.vars.services
}
/etc/icinga2/zones.d/global-templates/icinga-templates.conf:
template Host "icinga-master-zone" {
vars.services += ["icinga-cluster-zone-health", "icinga-zone-connectivity"]
}
template Host "icinga-satellite-zone" {
vars.services += ["icinga-zone-connectivity"]
}
template Host "icinga-master-host" {
import "icinga-host"
}
template Host "icinga-satellite-host" {
import "icinga-host"
}
template Host "icinga-host" {
vars.services += ["icinga-health"]
}
/etc/icinga2/zones.d/master/server.conf:
object Host "Icinga master" {
import "ping"
import "icinga-master-zone"
address = "127.0.0.1"
groups = [ ]
zone = "master"
}
And on my zones.conf:
/* configuration for zone master */
object Endpoint "server1" {
host = "server1"
}
object Zone "master" {
endpoints = ["server1"]
}
object Endpoint "satellite01" {
host = "satellite01"
}
object Zone "zone1" {
endpoints = ["satellite01"]
parent = "master"
}
....
All the rest is working fine: Icinga zone connectivity is ok , Icinga health is ok , .. I can retreive all my perfdatas, ...
The only problem is this point, I don't understand why it says that my master is not connected.
Thanks for any help
ref/IP/37158