object Host "my-server1" {
vars.address = "10.0.0.1"
- check = "ping4"
+ check_command = "hostcheck"
}
apply Service "ping4" {
The example host `my-server1` creates two services which belong to this host:
`ping4` and `http`.
-It also specifies that the host should inherit its availability state from the
-`ping4` service.
+It also specifies that the host should perform its own check using the `hostcheck`
+check command.
-> **Note**
->
-> In Icinga 1.x hosts had their own check command, check interval and
-> notification settings. Instead, in Icinga 2 hosts inherit their state
-> from one of its child services. No checks are performed for the host
-> itself.
-
-The `address` macro is used by check commands to determine which network
+The `address` custom attribute is used by check commands to determine which network
address is associated with the host object.
### <a id="host-states"></a> Host States
Check command object for the `check_ping` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_ping` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
packets | **Optional.** The number of packets to send. Defaults to 5.
timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
+### <a id="itl-hostcheck"></a> hostcheck
+
+Check command object for the `check_ping` plugin with host check default values.
+
+Custom Attributes:
+
+Name | Description
+----------------|--------------
+address | **Required.** The host's IPv4 address.
+wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 3000.0.
+wpl | **Optional.** The packet loss warning threshold in %. Defaults to 80.
+crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 5000.0.
+cpl | **Optional.** The packet loss critical threshold in %. Defaults to 100.
+packets | **Optional.** The number of packets to send. Defaults to 5.
+timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
+
### <a id="itl-dummy"></a> dummy
Check command object for the `check_dummy` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Specialised check command object for passive checks executing the `check_dummy` plugin with appropriate default values.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_tcp` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_udp` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_http` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_http` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_http` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_http` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_smtp` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_ssmtp` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_ntp_time` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_ssh` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_disk` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_disk` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_processes` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_load` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_snmp` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------
Check command object for the `check_snmp` plugin.
-Macros:
+Custom Attributes:
Name | Description
----------------|--------------