maybe chmod 0644 'icinga2/zones.conf.orig'
maybe chmod 0755 'icinga2/zones.d'
maybe chmod 0644 'icinga2/zones.d/README'
+maybe chmod 0755 'icinga2/zones.d/master'
+maybe chmod 0644 'icinga2/zones.d/master/hosts.conf'
+maybe chmod 0644 'icinga2/zones.d/master/services.conf'
maybe chmod 0755 'init'
maybe chmod 0755 'init.d'
maybe chmod 0644 'init.d/README'
check_command = "disk"
vars += config
+
+ assign where ! host.vars.client_endpoint
}
* the preferred way is to create separate directories and files in the conf.d
* directory. Each of these files must have the file extension ".conf".
*/
-#include_recursive "conf.d"
+include_recursive "conf.d"
object Endpoint "ns1.uhu-banane.de" {
- host = "ns1.uhu-banane.de"
- port = "5665"
}
object Zone "master" {
port = "5665"
}
-object Zone "icinga_clients_de" {
- endpoints = [ "ns3.uhu-banane.de", "sarah.uhu-banane.de" ]
+object Zone "ns3.uhu-banane.de" {
+ endpoints = [ "ns3.uhu-banane.de" ]
+ parent = "master"
+}
+
+object Zone "sarah.uhu-banane.de" {
+ endpoints = [ "sarah.uhu-banane.de" ]
parent = "master"
}
--- /dev/null
+object Host "ns3.uhu-banane.de" {
+ check_command = "hostalive" //check is executed on the master
+ address = "185.102.95.107"
+
+ vars.os = "Linux"
+ vars.os_family = "Debian"
+ # All about DNS server
+ vars.is_ns = true
+ vars.check_dns_domain = "uhu-banane.de"
+
+ /* Define http vhost attributes for service apply rules in `services.conf`. */
+ vars.http_vhosts["http"] = {
+ http_uri = "/"
+ }
+
+ /* Define disks and attributes for service apply rules in `services.conf`. */
+ vars.disks["disk"] = {
+ /* No parameters. */
+ }
+ vars.disks["disk /"] = {
+ disk_partitions = "/"
+ }
+ vars.disks["disk /home"] = {
+ disk_partitions = "/home"
+ }
+ vars.disks["disk /tmp"] = {
+ disk_partitions = "/tmp"
+ }
+ vars.disks["disk /var"] = {
+ disk_partitions = "/var"
+ }
+
+ /* Define notification mail attributes for notification apply rules in `notifications.conf`. */
+ vars.notification["mail"] = {
+ /* The UserGroup `icingaadmins` is defined in `users.conf`. */
+ groups = [ "icingaadmins" ]
+ }
+ vars.client_endpoint = name //follows the convention that host name == endpoint name
+}
+
--- /dev/null
+
+#apply Service "ping4" {
+# check_command = "ping4"
+# //check is executed on the master node
+# assign where host.address
+#}
+
+apply Service for (disk => config in host.vars.disks) {
+ import "generic-service"
+ check_command = "disk"
+
+ vars += config
+
+ //specify where the check is executed
+ command_endpoint = host.vars.client_endpoint
+
+ assign where host.vars.client_endpoint
+}
+
+apply Service "apt" {
+ import "generic-service"
+
+ check_command = "apt"
+ enable_notifications = false
+
+ //specify where the check is executed
+ command_endpoint = host.vars.client_endpoint
+
+ assign where host.vars.client_endpoint && host.vars.os_family == "Debian"
+
+}
+
+apply Service "load" {
+ import "generic-service"
+
+ check_command = "load"
+
+ /* Used by the ScheduledDowntime apply rule in `downtimes.conf`. */
+ vars.backup_downtime = "02:00-03:00"
+
+ //specify where the check is executed
+ command_endpoint = host.vars.client_endpoint
+
+ assign where host.vars.client_endpoint
+
+}
+
+apply Service "procs" {
+ import "generic-service"
+
+ check_command = "procs"
+
+ //specify where the check is executed
+ command_endpoint = host.vars.client_endpoint
+
+ assign where host.vars.client_endpoint
+
+}
+
+apply Service "swap" {
+ import "generic-service"
+
+ check_command = "swap"
+
+ //specify where the check is executed
+ command_endpoint = host.vars.client_endpoint
+
+ assign where host.vars.client_endpoint
+}
+
+apply Service "users" {
+ import "generic-service"
+
+ check_command = "users"
+
+ //specify where the check is executed
+ command_endpoint = host.vars.client_endpoint
+
+ assign where host.vars.client_endpoint
+}
+