mirror of https://github.com/Icinga/icinga2.git
parent
0dedd7cf19
commit
0d59e91f7e
|
@ -8,6 +8,8 @@ Example:
|
||||||
|
|
||||||
object Host "localhost" {
|
object Host "localhost" {
|
||||||
display_name = "The best host there is"
|
display_name = "The best host there is"
|
||||||
|
address = "127.0.0.1"
|
||||||
|
address6 = "::1"
|
||||||
|
|
||||||
groups = [ "all-hosts" ]
|
groups = [ "all-hosts" ]
|
||||||
|
|
||||||
|
@ -19,6 +21,8 @@ Attributes:
|
||||||
Name |Description
|
Name |Description
|
||||||
----------------|----------------
|
----------------|----------------
|
||||||
display_name |**Optional.** A short description of the host.
|
display_name |**Optional.** A short description of the host.
|
||||||
|
address |**Optional.** The host's address. Available as command runtime macro `$address$` if set.
|
||||||
|
address6 |**Optional.** The host's address. Available as command runtime macro `$address6$` if set.
|
||||||
groups |**Optional.** A list of host groups this host belongs to.
|
groups |**Optional.** A list of host groups this host belongs to.
|
||||||
vars |**Optional.** A dictionary containing custom attributes that are specific to this host.
|
vars |**Optional.** A dictionary containing custom attributes that are specific to this host.
|
||||||
check\_command |**Required.** The name of the check command.
|
check\_command |**Required.** The name of the check command.
|
||||||
|
@ -37,6 +41,20 @@ Attributes:
|
||||||
volatile |**Optional.** The volatile setting enables always `HARD` state types if `NOT-OK` state changes occur.
|
volatile |**Optional.** The volatile setting enables always `HARD` state types if `NOT-OK` state changes occur.
|
||||||
authorities |**Optional.** A list of Endpoints on which this host check will be executed in a cluster scenario.
|
authorities |**Optional.** A list of Endpoints on which this host check will be executed in a cluster scenario.
|
||||||
domains |**Optional.** A list of Domains for this host object in a cluster scenario.
|
domains |**Optional.** A list of Domains for this host object in a cluster scenario.
|
||||||
|
notes |**Optional.** Notes for the host.
|
||||||
|
notes_url |**Optional.** Url for notes for the host (for example, in notification commands).
|
||||||
|
action_url |**Optional.** Url for actions for the host (for example, an external graphing tool).
|
||||||
|
icon_image |**Optional.** Icon image for the host. Required for external interfaces only.
|
||||||
|
icon_image_alt |**Optional.** Icon image description for the host. Required for external interface only.
|
||||||
|
|
||||||
|
> **Best Practice**
|
||||||
|
>
|
||||||
|
> The `address` and `address6` attributes are required for running commands using
|
||||||
|
> the `$address$` and `$address6` runtime macros.
|
||||||
|
|
||||||
|
Unlike Icinga 1.x the `statusmap_image` and `2d_coords` attributes are
|
||||||
|
custom attributes only in Icinga 2.
|
||||||
|
|
||||||
|
|
||||||
### <a id="objecttype-hostgroup"></a> HostGroup
|
### <a id="objecttype-hostgroup"></a> HostGroup
|
||||||
|
|
||||||
|
@ -75,10 +93,8 @@ Example:
|
||||||
|
|
||||||
check_command = "check_snmp"
|
check_command = "check_snmp"
|
||||||
|
|
||||||
vars = {
|
vars.community = "public"
|
||||||
community = "public"
|
vars.oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"
|
||||||
oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"
|
|
||||||
}
|
|
||||||
|
|
||||||
check_interval = 60s
|
check_interval = 60s
|
||||||
retry_interval = 15s
|
retry_interval = 15s
|
||||||
|
@ -94,7 +110,8 @@ Attributes:
|
||||||
name |**Required.** The service name. Must be unique on a per-host basis (Similar to the service_description attribute in Icinga 1.x).
|
name |**Required.** The service name. Must be unique on a per-host basis (Similar to the service_description attribute in Icinga 1.x).
|
||||||
groups |**Optional.** The service groups this service belongs to.
|
groups |**Optional.** The service groups this service belongs to.
|
||||||
|
|
||||||
In addition to these attributes you can also use any of the attributes which are also valid for `Host` objects.
|
In addition to these attributes you can also use any of the attributes except the `address` and `address6` which are also valid
|
||||||
|
for `Host` objects.
|
||||||
|
|
||||||
Service objects have composite names, i.e. their names are based on the host_name attribute and the name you specified. This means
|
Service objects have composite names, i.e. their names are based on the host_name attribute and the name you specified. This means
|
||||||
you can define more than one object with the same (short) name as long as the `host_name` attribute has a different value.
|
you can define more than one object with the same (short) name as long as the `host_name` attribute has a different value.
|
||||||
|
@ -236,21 +253,15 @@ Example:
|
||||||
object User "icingaadmin" {
|
object User "icingaadmin" {
|
||||||
display_name = "Icinga 2 Admin"
|
display_name = "Icinga 2 Admin"
|
||||||
groups = [ "icingaadmins" ]
|
groups = [ "icingaadmins" ]
|
||||||
|
email = "icinga@localhost"
|
||||||
|
pager = "icingaadmin@localhost.localdomain"
|
||||||
|
|
||||||
notificcation_period = "24x7"
|
notification_period = "24x7"
|
||||||
|
|
||||||
states = [ OK, Warning, Critical, Unknown ]
|
states = [ OK, Warning, Critical, Unknown ]
|
||||||
types = [ Problem, Recovery ]
|
types = [ Problem, Recovery ]
|
||||||
|
|
||||||
vars = {
|
vars.additional_notes = "This is the Icinga 2 Admin account."
|
||||||
name = "Icinga 2 Admin"
|
|
||||||
email = "icinga@localhost"
|
|
||||||
pager = "icingaadmin@localhost.localdomain"
|
|
||||||
}
|
|
||||||
|
|
||||||
custom = {
|
|
||||||
notes = "This is the Icinga 2 Admin account."
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Available notification state filters:
|
Available notification state filters:
|
||||||
|
@ -279,6 +290,8 @@ Attributes:
|
||||||
Name |Description
|
Name |Description
|
||||||
----------------|----------------
|
----------------|----------------
|
||||||
display_name |**Optional.** A short description of the user.
|
display_name |**Optional.** A short description of the user.
|
||||||
|
email |**Optional.** An email string for this user. Useful for notification commands.
|
||||||
|
pager |**Optional.** A pager string for this user. Useful for notification commands.
|
||||||
vars |**Optional.** A dictionary containing custom attributes that are specific to this user.
|
vars |**Optional.** A dictionary containing custom attributes that are specific to this user.
|
||||||
groups |**Optional.** An array of group names.
|
groups |**Optional.** An array of group names.
|
||||||
enable_notifications|**Optional.** Whether notifications are enabled for this user.
|
enable_notifications|**Optional.** Whether notifications are enabled for this user.
|
||||||
|
@ -433,10 +446,8 @@ Example:
|
||||||
"-o", "$oid$"
|
"-o", "$oid$"
|
||||||
]
|
]
|
||||||
|
|
||||||
vars = {
|
vars.address = "127.0.0.1"
|
||||||
address = "127.0.0.1"
|
vars.community = "public"
|
||||||
community = "public"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
|
|
Loading…
Reference in New Issue