]> granicus.if.org Git - icinga2/blob - doc/6.05-domains.md
Fix unit tests.
[icinga2] / doc / 6.05-domains.md
1 ## <a id="domains"></a> Domains
2
3 A [Service](#objecttype-service) object can be restricted using the `domains` attribute
4 array specifying endpoint privileges.
5 A Domain object specifices the ACLs applied for each [Endpoint](#objecttype-endpoint).
6
7 The following example assigns the domain `dmz-db` to the service `dmz-oracledb`. Endpoint
8 `icinga-node-dmz-1` does not allow any object modification (no commands, check results) and only
9 relays local messages to the remote node(s). The endpoint `icinga-node-dmz-2` processes all
10 messages read and write (accept check results, commands and also relay messages to remote
11 nodes).
12
13 That way the service `dmz-oracledb` on endpoint `icinga-node-dmz-1` will not be modified
14 by any cluster event message, and could be checked by the local authority too presenting
15 a different state history. `icinga-node-dmz-2` still receives all cluster message updates
16 from the `icinga-node-dmz-1` endpoint.
17
18     object Host "dmz-host1" {
19       import "generic-host"
20     }
21
22     object Service "dmz-oracledb" {
23       import "generic-service"
24
25       host_name = "dmz-host1"
26
27       domains = [ "dmz-db" ]
28       authorities = [ "icinga-node-dmz-1", "icinga-node-dmz-2"]
29     }
30
31     object Domain "dmz-db" {
32       acl = {
33         "icinga-node-dmz-1" = DomainPrivReadOnly
34         "icinga-node-dmz-2" = DomainPrivReadWrite
35       }
36     }