mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
parent
ae94ae8599
commit
47ea2ba559
@ -206,6 +206,41 @@ Read further about additional [naming conventions](#cluster-naming-convention).
|
|||||||
Not specifying the node name will make Icinga 2 using the FQDN. Make sure that all
|
Not specifying the node name will make Icinga 2 using the FQDN. Make sure that all
|
||||||
configured endpoint names and common names are the same.
|
configured endpoint names and common names are the same.
|
||||||
|
|
||||||
|
### <a id="cluster-naming-convention"></a> Cluster Naming Convention
|
||||||
|
|
||||||
|
The SSL certificate common name (CN) will be used by the [ApiListener](#objecttype-apilistener)
|
||||||
|
object to determine the local authority. This name must match the local [Endpoint](#objecttype-endpoint)
|
||||||
|
object name.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
# icinga2-build-key icinga2a
|
||||||
|
...
|
||||||
|
Common Name (e.g. server FQDN or YOUR name) [icinga2a]:
|
||||||
|
|
||||||
|
# vim cluster.conf
|
||||||
|
|
||||||
|
object Endpoint "icinga2a" {
|
||||||
|
host = "icinga2a.icinga.org"
|
||||||
|
}
|
||||||
|
|
||||||
|
The [Endpoint](#objecttype-endpoint) name is further referenced as `endpoints` attribute on the
|
||||||
|
[Zone](objecttype-zone) object.
|
||||||
|
|
||||||
|
object Endpoint "icinga2b" {
|
||||||
|
host = "icinga2b.icinga.org"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Zone "config-ha-master" {
|
||||||
|
endpoints = [ "icinga2a", "icinga2b" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
Specifying the local node name using the [NodeName](#global-constants) variable requires
|
||||||
|
the same name as used for the endpoint name and common name above. If not set, the FQDN is used.
|
||||||
|
|
||||||
|
const NodeName = "icinga2a"
|
||||||
|
|
||||||
|
|
||||||
### <a id="configure-clusterlistener-object"></a> Configure the ApiListener Object
|
### <a id="configure-clusterlistener-object"></a> Configure the ApiListener Object
|
||||||
|
|
||||||
The [ApiListener](#objecttype-apilistener) object needs to be configured on
|
The [ApiListener](#objecttype-apilistener) object needs to be configured on
|
||||||
@ -244,8 +279,7 @@ A sample configuration looks like:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
object Endpoint "icinga2a" {
|
object Endpoint "icinga2a" {
|
||||||
host = "icinga2a.localdomain"
|
host = "icinga2a.icinga.org"
|
||||||
port = 5665
|
|
||||||
}
|
}
|
||||||
|
|
||||||
If this endpoint object is reachable on a different port, you must configure the
|
If this endpoint object is reachable on a different port, you must configure the
|
||||||
@ -311,15 +345,15 @@ syncs the configuration to the child zones, if allowed.
|
|||||||
health.conf
|
health.conf
|
||||||
demo.conf
|
demo.conf
|
||||||
|
|
||||||
|
If the local configuration is newer than the received update Icinga 2 will skip the synchronisation
|
||||||
|
process.
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
>
|
>
|
||||||
> `zones.d` must not be included in [icinga2.conf](#icinga2-conf). Icinga 2 automatically
|
> `zones.d` must not be included in [icinga2.conf](#icinga2-conf). Icinga 2 automatically
|
||||||
> determines the required include directory. This can be overridden using the
|
> determines the required include directory. This can be overridden using the
|
||||||
> [global constant](#global-constants) `ZonesDir`.
|
> [global constant](#global-constants) `ZonesDir`.
|
||||||
|
|
||||||
If the local configuration is newer than the received update Icinga 2 will skip the synchronisation
|
|
||||||
process.
|
|
||||||
|
|
||||||
#### <a id="zone-synchronisation-permissions"></a> Zone Configuration Permissions
|
#### <a id="zone-synchronisation-permissions"></a> Zone Configuration Permissions
|
||||||
|
|
||||||
Each [ApiListener](#objecttype-apilistener) object must have the `accept_config` attribute
|
Each [ApiListener](#objecttype-apilistener) object must have the `accept_config` attribute
|
||||||
@ -332,42 +366,6 @@ set to `true` to receive configuration from the parent `Zone` members. Default v
|
|||||||
accept_config = true
|
accept_config = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
### <a id="cluster-naming-convention"></a> Cluster Naming Convention
|
|
||||||
|
|
||||||
The SSL certificate common name (CN) will be used by the [ApiListener](#objecttype-apilistener)
|
|
||||||
object to determine the local authority. This name must match the local [Endpoint](#objecttype-endpoint)
|
|
||||||
object name.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
# icinga2-build-key icinga2a
|
|
||||||
...
|
|
||||||
Common Name (e.g. server FQDN or YOUR name) [icinga2a]:
|
|
||||||
|
|
||||||
# vim cluster.conf
|
|
||||||
|
|
||||||
object Endpoint "icinga2a" {
|
|
||||||
host = "icinga2a.localdomain"
|
|
||||||
}
|
|
||||||
|
|
||||||
The [Endpoint](#objecttype-endpoint) name is further referenced as `endpoints` attribute on the
|
|
||||||
[Zone](objecttype-zone) object.
|
|
||||||
|
|
||||||
object Endpoint "icinga2b" {
|
|
||||||
host = "icinga2b.localdomain"
|
|
||||||
}
|
|
||||||
|
|
||||||
object Zone "config-ha-master" {
|
|
||||||
endpoints = [ "icinga2a", "icinga2b" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
Specifying the local node name using the [NodeName](#global-constants) variable requires
|
|
||||||
the same name as used for the endpoint name and common name above. If not set, the FQDN is used.
|
|
||||||
|
|
||||||
const NodeName = "icinga2a"
|
|
||||||
|
|
||||||
|
|
||||||
### <a id="initial-cluster-sync"></a> Initial Cluster Sync
|
### <a id="initial-cluster-sync"></a> Initial Cluster Sync
|
||||||
|
|
||||||
In order to make sure that all of your cluster nodes have the same state you will
|
In order to make sure that all of your cluster nodes have the same state you will
|
||||||
@ -443,7 +441,7 @@ could look like this:
|
|||||||
templates/
|
templates/
|
||||||
zones.d
|
zones.d
|
||||||
nuremberg/
|
nuremberg/
|
||||||
hosts.conf
|
local.conf
|
||||||
berlin/
|
berlin/
|
||||||
hosts.conf
|
hosts.conf
|
||||||
vienna/
|
vienna/
|
||||||
@ -476,12 +474,12 @@ The zones would look like:
|
|||||||
|
|
||||||
object Zone "berlin" {
|
object Zone "berlin" {
|
||||||
endpoints = [ "berlin-satellite" ]
|
endpoints = [ "berlin-satellite" ]
|
||||||
parent = "nuremberg-master"
|
parent = "nuremberg"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Zone "vienna" {
|
object Zone "vienna" {
|
||||||
endpoints = [ "vienna-satellite" ]
|
endpoints = [ "vienna-satellite" ]
|
||||||
parent = "nuremberg-master"
|
parent = "nuremberg"
|
||||||
}
|
}
|
||||||
|
|
||||||
The `nuremberg-master` zone will only execute local checks, and receive
|
The `nuremberg-master` zone will only execute local checks, and receive
|
||||||
@ -503,35 +501,36 @@ but you may also disable the `Checker` feature.
|
|||||||
conf.d/
|
conf.d/
|
||||||
templates/
|
templates/
|
||||||
zones.d/
|
zones.d/
|
||||||
many/
|
central/
|
||||||
|
checker/
|
||||||
|
|
||||||
If you are planning to have some checks executed by a specific set of checker nodes
|
If you are planning to have some checks executed by a specific set of checker nodes
|
||||||
you have to define additional zones and define these check objects there.
|
you have to define additional zones and define these check objects there.
|
||||||
|
|
||||||
Endpoints:
|
Endpoints:
|
||||||
|
|
||||||
object Endpoint "central" {
|
object Endpoint "central-node" {
|
||||||
host = "central.icinga.org"
|
host = "central.icinga.org"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Endpoint "checker1" {
|
object Endpoint "checker1-node" {
|
||||||
host = "checker1.icinga.org"
|
host = "checker1.icinga.org"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Endpoint "checker2" {
|
object Endpoint "checker2-node" {
|
||||||
host = "checker2.icinga.org"
|
host = "checker2.icinga.org"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Zones:
|
Zones:
|
||||||
|
|
||||||
object Zone "master" {
|
object Zone "central" {
|
||||||
endpoints = [ "central" ]
|
endpoints = [ "central-node" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
object Zone "many" {
|
object Zone "checker" {
|
||||||
endpoints = [ "checker1", "checker2" ]
|
endpoints = [ "checker1-node", "checker2-node" ]
|
||||||
parent = "master"
|
parent = "central"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -548,7 +547,7 @@ Connections from other zones will be accepted by all active and passive nodes
|
|||||||
but all are forwarded to the current active master dealing with the check results,
|
but all are forwarded to the current active master dealing with the check results,
|
||||||
commands, etc.
|
commands, etc.
|
||||||
|
|
||||||
object Zone "ha-master" {
|
object Zone "config-ha-master" {
|
||||||
endpoints = [ "icinga2a", "icinga2b", "icinga2c" ]
|
endpoints = [ "icinga2a", "icinga2b", "icinga2c" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user