11. Icinga Template Library

The Icinga Template Library (ITL) implements standard templates and object definitions for commonly used services.

By default the ITL is included in the icinga2.conf configuration file:

include <itl>

11.1. Generic Templates

These templates are imported by the provided example configuration.

Note:

These templates are built into the binaries. By convention all command and timeperiod objects should import these templates.

11.1.1. plugin-check-command

Command template for check plugins executed by Icinga 2.

The plugin-check-command command does not support any vars.

By default this template is automatically imported into all CheckCommand definitions.

11.1.2. plugin-notification-command

Command template for notification scripts executed by Icinga 2.

The plugin-notification-command command does not support any vars.

By default this template is automatically imported into all CheckCommand definitions.

11.1.3. plugin-event-command

Command template for event handler scripts executed by Icinga 2.

The plugin-event-command command does not support any vars.

By default this template is automatically imported into all CheckCommand definitions.

11.1.4. legacy-timeperiod

Timeperiod template for Timeperiod objects.

The legacy-timeperiod timeperiod does not support any vars.

By default this template is automatically imported into all CheckCommand definitions.

11.2. Check Commands

These check commands are embedded into Icinga 2 and do not require any external plugin scripts.

11.2.1. icinga

Check command for the built-in icinga check. This check returns performance data for the current Icinga instance.

The icinga check command does not support any vars.

11.2.2. cluster

Check command for the built-in cluster check. This check returns performance data for the current Icinga instance and connected endpoints.

The cluster check command does not support any vars.

11.2.3. cluster-zone

Check command for the built-in cluster-zone check.

Custom attributes passed as command parameters:

Name Description
cluster_zone Required. The zone name.
cluster_lag_warning Optional. Warning threshold for log lag in seconds. Applies if the log lag is greater than the threshold.
cluster_lag_critical Optional. Critical threshold for log lag in seconds. Applies if the log lag is greater than the threshold.

11.2.4. ido

Check command for the built-in ido check.

Custom attributes passed as command parameters:

Name Description
ido_type Required. The type of the IDO connection object. Can be either "IdoMysqlConnection" or "IdoPgsqlConnection".
ido_name Required. The name of the IDO connection object.

11.2.5. random

Check command for the built-in random check. This check returns random states and adds the check source to the check output.

For test and demo purposes only. The random check command does not support any vars.

11.2.6. exception

Check command for the built-in exception check. This check throws an exception.

For test and demo purposes only. The exception check command does not support any vars.