summaryrefslogtreecommitdiffstats
path: root/etc/icinga2/conf.d/win32
diff options
context:
space:
mode:
Diffstat (limited to 'etc/icinga2/conf.d/win32')
-rw-r--r--etc/icinga2/conf.d/win32/hosts.conf43
-rw-r--r--etc/icinga2/conf.d/win32/services.conf92
2 files changed, 135 insertions, 0 deletions
diff --git a/etc/icinga2/conf.d/win32/hosts.conf b/etc/icinga2/conf.d/win32/hosts.conf
new file mode 100644
index 0000000..ecee11a
--- /dev/null
+++ b/etc/icinga2/conf.d/win32/hosts.conf
@@ -0,0 +1,43 @@
+/*
+ * Host definitions with object attributes
+ * used for apply rules for Service, Notification,
+ * Dependency and ScheduledDowntime objects.
+ *
+ * Tip: Use `icinga2 object list --type Host` to
+ * list all host objects after running
+ * configuration validation (`icinga2 daemon -C`).
+ */
+
+/*
+ * This is an example host based on your
+ * local host's FQDN. Specify the NodeName
+ * constant in `constants.conf` or use your
+ * own description, e.g. "db-host-1".
+ */
+
+object Host NodeName {
+ /* Import the default host template defined in `templates.conf`. */
+ import "generic-host"
+
+ /* Specify the address attributes for checks e.g. `ssh` or `http`. */
+ address = "127.0.0.1"
+ address6 = "::1"
+
+ /* Set custom variable `os` for hostgroup assignment in `groups.conf`. */
+ vars.os = "Windows"
+
+ /* Define disks and attributes for service apply rules in `services.conf`. */
+ vars.disks["disk"] = {
+ /* No parameters. */
+ }
+ vars.disks["disk C:"] = {
+ disk_win_path = "C:"
+ }
+
+ /* Define notification mail attributes for notification apply rules in `notifications.conf`. */
+ vars.notification["mail"] = {
+ /* The UserGroup `icingaadmins` is defined in `users.conf`. */
+ groups = [ "icingaadmins" ]
+ }
+}
+
diff --git a/etc/icinga2/conf.d/win32/services.conf b/etc/icinga2/conf.d/win32/services.conf
new file mode 100644
index 0000000..929be54
--- /dev/null
+++ b/etc/icinga2/conf.d/win32/services.conf
@@ -0,0 +1,92 @@
+/*
+ * Service apply rules.
+ *
+ * The CheckCommand objects `ping4`, `ping6`, etc
+ * are provided by the plugin check command templates.
+ * Check the documentation for details.
+ *
+ * Tip: Use `icinga2 object list --type Service` to
+ * list all service objects after running
+ * configuration validation (`icinga2 daemon -C`).
+ */
+
+/*
+ * This is an example host based on your
+ * local host's FQDN. Specify the NodeName
+ * constant in `constants.conf` or use your
+ * own description, e.g. "db-host-1".
+ */
+
+/*
+ * These are generic `ping4` and `ping6`
+ * checks applied to all hosts having the
+ * `address` resp. `address6` attribute
+ * defined.
+ */
+apply Service "ping4" {
+ import "generic-service"
+
+ check_command = "ping4-windows"
+
+ assign where host.address
+}
+
+apply Service "ping6" {
+ import "generic-service"
+
+ check_command = "ping6-windows"
+
+ assign where host.address6
+}
+
+apply Service for (disk => config in host.vars.disks) {
+ import "generic-service"
+
+ check_command = "disk-windows"
+
+ vars += config
+}
+
+apply Service "icinga" {
+ import "generic-service"
+
+ check_command = "icinga"
+
+ assign where host.name == NodeName
+}
+
+apply Service "load" {
+ import "generic-service"
+
+ check_command = "load-windows"
+
+ /* Used by the ScheduledDowntime apply rule in `downtimes.conf`. */
+ vars.backup_downtime = "02:00-03:00"
+
+ assign where host.name == NodeName
+}
+
+apply Service "procs" {
+ import "generic-service"
+
+ check_command = "procs-windows"
+
+ assign where host.name == NodeName
+}
+
+apply Service "swap" {
+ import "generic-service"
+
+ check_command = "swap-windows"
+
+ assign where host.name == NodeName
+}
+
+apply Service "users" {
+ import "generic-service"
+
+ check_command = "users-windows"
+
+ assign where host.name == NodeName
+}
+