From 05be1a939f39b107ea4075b8c04744d3d047d623 Mon Sep 17 00:00:00 2001 From: Tobias Bauriedel Date: Wed, 26 Jul 2023 09:25:00 +0200 Subject: [PATCH] Add documentation for Icinga 2 templates (#169) --- doc/role-icinga2/objects.md | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/doc/role-icinga2/objects.md b/doc/role-icinga2/objects.md index ba4d5c5d..89eb4355 100644 --- a/doc/role-icinga2/objects.md +++ b/doc/role-icinga2/objects.md @@ -207,6 +207,19 @@ vars.attr["key1"] = { ### Examples: +#### Host Template + +``` +icinga2_objects: +[...] + - name: generic-host + type: Host + file: zones.d/main/hosts/template.conf + check_command: hostalive + check_interval: 3m + template: true +``` + #### Host ``` @@ -238,6 +251,20 @@ icinga2_objects: - host.vars.os == Linux ``` +#### Service Template + +``` +icinga2_objects: +[...] + - name: generic-service + type: Service + file: zones.d/main/services/template.conf + check_interval: 300s + retry_interval: 30s + order: 1 + template: true +``` + #### Service Apply ``` @@ -365,6 +392,18 @@ icinga2_objects: "sunday": "10:00-11:00" ``` +#### Notification Template + +``` +icinga2_objects: +[...] + - name: notification-template + type: Notification + command: generic-notification + file: zones.d/main/notification/template.conf + template: true +``` + #### Notification ```