]> granicus.if.org Git - icinga2/commitdiff
Documentation: Update object attributes.
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 17 Apr 2014 09:59:11 +0000 (11:59 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 17 Apr 2014 09:59:11 +0000 (11:59 +0200)
Fixes #6009

doc/4.3-object-types.md

index 57ff77b1d46dfd6ffc7ef7a54a8c9cfe737a4545..d467ddca8636b2f48680c577b8068aad75ea5333 100644 (file)
@@ -8,6 +8,8 @@ Example:
 
     object Host "localhost" {
       display_name = "The best host there is"
+      address = "127.0.0.1"
+      address6 = "::1"
 
       groups = [ "all-hosts" ]
 
@@ -19,6 +21,8 @@ Attributes:
   Name            |Description
   ----------------|----------------
   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.
   vars            |**Optional.** A dictionary containing custom attributes that are specific to this host.
   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.
   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.
+  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
 
@@ -75,10 +93,8 @@ Example:
 
       check_command = "check_snmp"
 
-      vars = {
-        community = "public"
-        oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"
-      }
+      vars.community = "public"
+      vars.oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"
 
       check_interval = 60s
       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).
   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
 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" {
       display_name = "Icinga 2 Admin"
       groups = [ "icingaadmins" ]
+      email = "icinga@localhost"
+      pager = "icingaadmin@localhost.localdomain"
 
-      notificcation_period = "24x7"
+      notification_period = "24x7"
 
       states = [ OK, Warning, Critical, Unknown ]
       types = [ Problem, Recovery ]
 
-      vars = {
-        name = "Icinga 2 Admin"
-        email = "icinga@localhost"
-        pager = "icingaadmin@localhost.localdomain"
-      }
-
-      custom = {
-        notes = "This is the Icinga 2 Admin account."
-      }
+      vars.additional_notes = "This is the Icinga 2 Admin account."
     }
 
 Available notification state filters:
@@ -279,6 +290,8 @@ Attributes:
   Name            |Description
   ----------------|----------------
   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.
   groups          |**Optional.** An array of group names.
   enable_notifications|**Optional.** Whether notifications are enabled for this user.
@@ -433,10 +446,8 @@ Example:
        "-o", "$oid$"
       ]
 
-      vars = {
-        address = "127.0.0.1"
-        community = "public"
-      }
+      vars.address = "127.0.0.1"
+      vars.community = "public"
     }
 
 Attributes: