]> Frank Brehm's Git Trees - config/ns1/etc.git/commitdiff
committing changes in /etc after apt run
authorFrank Brehm <frank@brehm-online.com>
Thu, 21 Sep 2017 20:43:00 +0000 (22:43 +0200)
committerFrank Brehm <frank@brehm-online.com>
Thu, 21 Sep 2017 20:43:00 +0000 (22:43 +0200)
Package changes:
-icinga2 2.6.0-2 amd64
-icinga2-bin 2.6.0-2 amd64
-icinga2-classicui 2.6.0-2 all
-icinga2-common 2.6.0-2 all
+icinga2 2.7.1-1.stretch amd64
+icinga2-bin 2.7.1-1.stretch amd64
+icinga2-classicui 2.7.1-1.stretch all
+icinga2-common 2.7.1-1.stretch all
-libicinga2 2.6.0-2 amd64
+libicinga2 2.7.1-1.stretch amd64
-libperl5.24 5.24.1-3+deb9u1 amd64
+libperl5.24 5.24.1-3+deb9u2 amd64
-perl 5.24.1-3+deb9u1 amd64
-perl-base 5.24.1-3+deb9u1 amd64
+perl 5.24.1-3+deb9u2 amd64
+perl-base 5.24.1-3+deb9u2 amd64
-perl-modules-5.24 5.24.1-3+deb9u1 all
+perl-modules-5.24 5.24.1-3+deb9u2 all
-vim-icinga2 2.6.0-2 all
+vim-icinga2 2.7.1-1.stretch all

icinga2/conf.d/commands.conf
icinga2/conf.d/notifications.conf
icinga2/conf.d/templates.conf
icinga2/features-available/influxdb.conf
icinga2/scripts/mail-host-notification.sh
icinga2/scripts/mail-service-notification.sh
icinga2/zones.conf
logrotate.d/icinga2

index e97b087afeb89767d225ebfdcfdfbe4766d87b93..9c5153811a7d4aee4cfbd41399ff56ec78447d81 100644 (file)
 /* Command objects */
 
+/* Notification Commands
+ *
+ * Please check the documentation for all required and
+ * optional parameters.
+ */
+
+object NotificationCommand "mail-host-notification" {
+  command = [ SysconfDir + "/icinga2/scripts/mail-host-notification.sh" ]
+
+  arguments += {
+    "-4" = "$notification_address$"
+    "-6" = "$notification_address6$"
+    "-b" = "$notification_author$"
+    "-c" = "$notification_comment$"
+    "-d" = {
+      required = true
+      value = "$notification_date$"
+    }
+    "-f" = {
+      value = "$notification_from$"
+      description = "Set from address. Requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE)"
+    }
+    "-i" = "$notification_icingaweb2url$"
+    "-l" = {
+      required = true
+      value = "$notification_hostname$"
+    }
+    "-n" = {
+      required = true
+      value = "$notification_hostdisplayname$"
+    }
+    "-o" = {
+      required = true
+      value = "$notification_hostoutput$"
+    }
+    "-r" = {
+      required = true
+      value = "$notification_useremail$"
+    }
+    "-s" = {
+      required = true
+      value = "$notification_hoststate$"
+    }
+    "-t" = {
+      required = true
+      value = "$notification_type$"
+    }
+    "-v" = "$notification_logtosyslog$"
+  }
+
+  vars += {
+    notification_address = "$address$"
+    notification_address6 = "$address6$"
+    notification_author = "$notification.author$"
+    notification_comment = "$notification.comment$"
+    notification_type = "$notification.type$"
+    notification_date = "$icinga.long_date_time$"
+    notification_hostname = "$host.name$"
+    notification_hostdisplayname = "$host.display_name$"
+    notification_hostoutput = "$host.output$"
+    notification_hoststate = "$host.state$"
+    notification_useremail = "$user.email$"
+  }
+}
+
+object NotificationCommand "mail-service-notification" {
+  command = [ SysconfDir + "/icinga2/scripts/mail-service-notification.sh" ]
+
+  arguments += {
+    "-4" = "$notification_address$"
+    "-6" = "$notification_address6$"
+    "-b" = "$notification_author$"
+    "-c" = "$notification_comment$"
+    "-d" = {
+      required = true
+      value = "$notification_date$"
+    }
+    "-e" = {
+      required = true
+      value = "$notification_servicename$"
+    }
+    "-f" = {
+      value = "$notification_from$"
+      description = "Set from address. Requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE)"
+    }
+    "-i" = "$notification_icingaweb2url$"
+    "-l" = {
+      required = true
+      value = "$notification_hostname$"
+    }
+    "-n" = {
+      required = true
+      value = "$notification_hostdisplayname$"
+    }
+    "-o" = {
+      required = true
+      value = "$notification_serviceoutput$"
+    }
+    "-r" = {
+      required = true
+      value = "$notification_useremail$"
+    }
+    "-s" = {
+      required = true
+      value = "$notification_servicestate$"
+    }
+    "-t" = {
+      required = true
+      value = "$notification_type$"
+    }
+    "-u" = {
+      required = true
+      value = "$notification_servicedisplayname$"
+    }
+    "-v" = "$notification_logtosyslog$"
+  }
+
+  vars += {
+    notification_address = "$address$"
+    notification_address6 = "$address6$"
+    notification_author = "$notification.author$"
+    notification_comment = "$notification.comment$"
+    notification_type = "$notification.type$"
+    notification_date = "$icinga.long_date_time$"
+    notification_hostname = "$host.name$"
+    notification_hostdisplayname = "$host.display_name$"
+    notification_servicename = "$service.name$"
+    notification_serviceoutput = "$service.output$"
+    notification_servicestate = "$service.state$"
+    notification_useremail = "$user.email$"
+    notification_servicedisplayname = "$service.display_name$"
+  }
+}
+
+/*
+ * If you prefer to use the notification scripts with environment
+ * variables instead of command line parameters, you can use
+ * the following commands. They have been updated from < 2.7
+ * to support the new notification scripts and should help
+ * with an upgrade.
+ * Remove the comment blocks and comment the notification commands above.
+ */
+
+/*
+
 object NotificationCommand "mail-host-notification" {
   command = [ SysconfDir + "/icinga2/scripts/mail-host-notification.sh" ]
 
   env = {
     NOTIFICATIONTYPE = "$notification.type$"
-    HOSTALIAS = "$host.display_name$"
+    HOSTDISPLAYNAME = "$host.display_name$"
+    HOSTNAME = "$host.name$"
     HOSTADDRESS = "$address$"
     HOSTSTATE = "$host.state$"
     LONGDATETIME = "$icinga.long_date_time$"
@@ -22,8 +168,9 @@ object NotificationCommand "mail-service-notification" {
 
   env = {
     NOTIFICATIONTYPE = "$notification.type$"
-    SERVICEDESC = "$service.name$"
-    HOSTALIAS = "$host.display_name$"
+    SERVICENAME = "$service.name$"
+    HOSTNAME = "$host.name$"
+    HOSTDISPLAYNAME = "$host.display_name$"
     HOSTADDRESS = "$address$"
     SERVICESTATE = "$service.state$"
     LONGDATETIME = "$icinga.long_date_time$"
@@ -36,3 +183,5 @@ object NotificationCommand "mail-service-notification" {
   }
 }
 
+*/
+
index 73f0f5f66334a74e55107bacc7f2fd5d48cda3fa..6a7e1f5a489d963fb416c0d893b34259364e8b9a 100644 (file)
 
 apply Notification "mail-icingaadmin" to Host {
   import "mail-host-notification"
-
   user_groups = host.vars.notification.mail.groups
   users = host.vars.notification.mail.users
 
+  //interval = 2h
+
+  //vars.notification_logtosyslog = true
+
   assign where host.vars.notification.mail
 }
 
 apply Notification "mail-icingaadmin" to Service {
   import "mail-service-notification"
-
   user_groups = host.vars.notification.mail.groups
   users = host.vars.notification.mail.users
 
+  //interval = 2h
+
+  //vars.notification_logtosyslog = true
+
   assign where host.vars.notification.mail
 }
index 3588f7fcfffbb4109fdda1ef5a879e5dc805b4d5..5655e3f2d4b7c3dadbdadbada85bc8c7d8957946 100644 (file)
@@ -51,6 +51,12 @@ template Notification "mail-host-notification" {
             FlappingStart, FlappingEnd,
             DowntimeStart, DowntimeEnd, DowntimeRemoved ]
 
+  vars += {
+    // notification_icingaweb2url = "https://www.example.com/icingaweb2"
+    // notification_from = "Icinga 2 Host Monitoring <icinga@example.com>"
+    notification_logtosyslog = false
+  }
+
   period = "24x7"
 }
 
@@ -67,6 +73,11 @@ template Notification "mail-service-notification" {
             FlappingStart, FlappingEnd,
             DowntimeStart, DowntimeEnd, DowntimeRemoved ]
 
+  vars += {
+    // notification_icingaweb2url = "https://www.example.com/icingaweb2"
+    // notification_from = "Icinga 2 Service Monitoring <icinga@example.com>"
+    notification_logtosyslog = false
+  }
+
   period = "24x7"
 }
-
index 058568bf1a777554715d6fcf97004df6b58b3d61..20f9ed253b0e36367b31122b31dd54a215f194ca 100644 (file)
@@ -9,6 +9,8 @@ object InfluxdbWriter "influxdb" {
   //host = "127.0.0.1"
   //port = 8086
   //database = "icinga2"
+  //flush_threshold = 1024
+  //flush_interval = 10s
   //host_template = {
   //  measurement = "$host.check_command$"
   //  tags = {
index e1ac7166486af5992519b0ce19052459a43706aa..d6e22ce9a32a3162ebe2c80266bc5686e4076bab 100755 (executable)
-#!/bin/sh
-template=`cat <<TEMPLATE
-***** Icinga  *****
+#!/usr/bin/env bash
+#
+# Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)
 
-Notification Type: $NOTIFICATIONTYPE
+PROG="`basename $0`"
+ICINGA2HOST="`hostname`"
+MAILBIN="mail"
 
-Host: $HOSTALIAS
-Address: $HOSTADDRESS
-State: $HOSTSTATE
+if [ -z "`which $MAILBIN`" ] ; then
+  echo "$MAILBIN not found in \$PATH. Consider installing it."
+  exit 1
+fi
 
-Date/Time: $LONGDATETIME
+## Function helpers
+Usage() {
+cat << EOF
 
-Additional Info: $HOSTOUTPUT
+Required parameters:
+  -d LONGDATETIME (\$icinga.long_date_time\$)
+  -l HOSTNAME (\$host.name\$)
+  -n HOSTDISPLAYNAME (\$host.display_name\$)
+  -o HOSTOUTPUT (\$host.output\$)
+  -r USEREMAIL (\$user.email\$)
+  -s HOSTSTATE (\$host.state\$)
+  -t NOTIFICATIONTYPE (\$notification.type\$)
 
-Comment: [$NOTIFICATIONAUTHORNAME] $NOTIFICATIONCOMMENT
-TEMPLATE
+Optional parameters:
+  -4 HOSTADDRESS (\$address\$)
+  -6 HOSTADDRESS6 (\$address6\$)
+  -b NOTIFICATIONAUTHORNAME (\$notification.author\$)
+  -c NOTIFICATIONCOMMENT (\$notification.comment\$)
+  -i ICINGAWEB2URL (\$notification_icingaweb2url\$, Default: unset)
+  -f MAILFROM (\$notification_mailfrom\$, requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE))
+  -v (\$notification_sendtosyslog\$, Default: false)
+
+EOF
+}
+
+Help() {
+  Usage;
+  exit 0;
+}
+
+Error() {
+  if [ "$1" ]; then
+    echo $1
+  fi
+  Usage;
+  exit 1;
+}
+
+## Main
+while getopts 4:6::b:c:d:f:hi:l:n:o:r:s:t:v: opt
+do
+  case "$opt" in
+    4) HOSTADDRESS=$OPTARG ;;
+    6) HOSTADDRESS6=$OPTARG ;;
+    b) NOTIFICATIONAUTHORNAME=$OPTARG ;;
+    c) NOTIFICATIONCOMMENT=$OPTARG ;;
+    d) LONGDATETIME=$OPTARG ;; # required
+    f) MAILFROM=$OPTARG ;;
+    h) Help ;;
+    i) ICINGAWEB2URL=$OPTARG ;;
+    l) HOSTNAME=$OPTARG ;; # required
+    n) HOSTDISPLAYNAME=$OPTARG ;; # required
+    o) HOSTOUTPUT=$OPTARG ;; # required
+    r) USEREMAIL=$OPTARG ;; # required
+    s) HOSTSTATE=$OPTARG ;; # required
+    t) NOTIFICATIONTYPE=$OPTARG ;; # required
+    v) VERBOSE=$OPTARG ;;
+   \?) echo "ERROR: Invalid option -$OPTARG" >&2
+       Error ;;
+    :) echo "Missing option argument for -$OPTARG" >&2
+       Error ;;
+    *) echo "Unimplemented option: -$OPTARG" >&2
+       Error ;;
+  esac
+done
+
+shift $((OPTIND - 1))
+
+## Check required parameters (TODO: better error message)
+## Keep formatting in sync with mail-service-notification.sh
+if [ ! "$LONGDATETIME" ] \
+|| [ ! "$HOSTNAME" ] || [ ! "$HOSTDISPLAYNAME" ] \
+|| [ ! "$HOSTOUTPUT" ] || [ ! "$HOSTSTATE" ] \
+|| [ ! "$USEREMAIL" ] || [ ! "$NOTIFICATIONTYPE" ]; then
+  Error "Requirement parameters are missing."
+fi
+
+## Build the message's subject
+SUBJECT="[$NOTIFICATIONTYPE] Host $HOSTDISPLAYNAME is $HOSTSTATE!"
+
+## Build the notification message
+NOTIFICATION_MESSAGE=`cat << EOF
+***** Host Monitoring on $ICINGA2HOST *****
+
+$HOSTDISPLAYNAME is $HOSTSTATE!
+
+Info:    $HOSTOUTPUT
+
+When:    $LONGDATETIME
+Host:    $HOSTNAME
+EOF
 `
 
-/usr/bin/printf "%b" "$template" | mail -s "$NOTIFICATIONTYPE - $HOSTDISPLAYNAME is $HOSTSTATE" $USEREMAIL
+## Check whether IPv4 was specified.
+if [ -n "$HOSTADDRESS" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+IPv4:   $HOSTADDRESS"
+fi
+
+## Check whether IPv6 was specified.
+if [ -n "$HOSTADDRESS6" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+IPv6:   $HOSTADDRESS6"
+fi
+
+## Check whether author and comment was specified.
+if [ -n "$NOTIFICATIONCOMMENT" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+
+Comment by $NOTIFICATIONAUTHORNAME:
+  $NOTIFICATIONCOMMENT"
+fi
+
+## Check whether Icinga Web 2 URL was specified.
+if [ -n "$ICINGAWEB2URL" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+
+$ICINGAWEB2URL/monitoring/host/show?host=$HOSTNAME"
+fi
+
+## Check whether verbose mode was enabled and log to syslog.
+if [ "$VERBOSE" == "true" ] ; then
+  logger "$PROG sends $SUBJECT => $USEREMAIL"
+fi
+
+## Send the mail using the $MAILBIN command.
+## If an explicit sender was specified, try to set it.
+if [ -n "$MAILFROM" ] ; then
+
+  ## Modify this for your own needs!
+
+  ## Debian/Ubuntu use mailutils which requires `-a` to append the header
+  if [ -f /etc/debian_version ]; then
+    /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
+  ## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
+  else
+    /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
+  fi
 
+else
+  /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" \
+  | $MAILBIN -s "$SUBJECT" $USEREMAIL
+fi
index 8574036b306acf6c20294bd976322c28a249de84..b94001dc9a6bf9989a2e1e10ba174778926bd536 100755 (executable)
-#!/bin/sh
-template=`cat <<TEMPLATE
-***** Icinga  *****
+#!/usr/bin/env bash
+#
+# Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)
 
-Notification Type: $NOTIFICATIONTYPE
+PROG="`basename $0`"
+ICINGA2HOST="`hostname`"
+MAILBIN="mail"
 
-Service: $SERVICEDESC
-Host: $HOSTALIAS
-Address: $HOSTADDRESS
-State: $SERVICESTATE
+if [ -z "`which $MAILBIN`" ] ; then
+  echo "$MAILBIN not found in \$PATH. Consider installing it."
+  exit 1
+fi
 
-Date/Time: $LONGDATETIME
+## Function helpers
+Usage() {
+cat << EOF
 
-Additional Info: $SERVICEOUTPUT
+Required parameters:
+  -d LONGDATETIME (\$icinga.long_date_time\$)
+  -e SERVICENAME (\$service.name\$)
+  -l HOSTNAME (\$host.name\$)
+  -n HOSTDISPLAYNAME (\$host.display_name\$)
+  -o SERVICEOUTPUT (\$service.output\$)
+  -r USEREMAIL (\$user.email\$)
+  -s SERVICESTATE (\$service.state\$)
+  -t NOTIFICATIONTYPE (\$notification.type\$)
+  -u SERVICEDISPLAYNAME (\$service.display_name\$)
 
-Comment: [$NOTIFICATIONAUTHORNAME] $NOTIFICATIONCOMMENT
-TEMPLATE
+Optional parameters:
+  -4 HOSTADDRESS (\$address\$)
+  -6 HOSTADDRESS6 (\$address6\$)
+  -b NOTIFICATIONAUTHORNAME (\$notification.author\$)
+  -c NOTIFICATIONCOMMENT (\$notification.comment\$)
+  -i ICINGAWEB2URL (\$notification_icingaweb2url\$, Default: unset)
+  -f MAILFROM (\$notification_mailfrom\$, requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE))
+  -v (\$notification_sendtosyslog\$, Default: false)
+
+EOF
+}
+
+Help() {
+  Usage;
+  exit 0;
+}
+
+Error() {
+  if [ "$1" ]; then
+    echo $1
+  fi
+  Usage;
+  exit 1;
+}
+
+## Main
+while getopts 4:6:b:c:d:e:f:hi:l:n:o:r:s:t:u:v: opt
+do
+  case "$opt" in
+    4) HOSTADDRESS=$OPTARG ;;
+    6) HOSTADDRESS6=$OPTARG ;;
+    b) NOTIFICATIONAUTHORNAME=$OPTARG ;;
+    c) NOTIFICATIONCOMMENT=$OPTARG ;;
+    d) LONGDATETIME=$OPTARG ;; # required
+    e) SERVICENAME=$OPTARG ;; # required
+    f) MAILFROM=$OPTARG ;;
+    h) Usage ;;
+    i) ICINGAWEB2URL=$OPTARG ;;
+    l) HOSTNAME=$OPTARG ;; # required
+    n) HOSTDISPLAYNAME=$OPTARG ;; # required
+    o) SERVICEOUTPUT=$OPTARG ;; # required
+    r) USEREMAIL=$OPTARG ;; # required
+    s) SERVICESTATE=$OPTARG ;; # required
+    t) NOTIFICATIONTYPE=$OPTARG ;; # required
+    u) SERVICEDISPLAYNAME=$OPTARG ;; # required
+    v) VERBOSE=$OPTARG ;;
+   \?) echo "ERROR: Invalid option -$OPTARG" >&2
+       Usage ;;
+    :) echo "Missing option argument for -$OPTARG" >&2
+       Usage ;;
+    *) echo "Unimplemented option: -$OPTARG" >&2
+       Usage ;;
+  esac
+done
+
+shift $((OPTIND - 1))
+
+## Check required parameters (TODO: better error message)
+## Keep formatting in sync with mail-host-notification.sh
+if [ ! "$LONGDATETIME" ] \
+|| [ ! "$HOSTNAME" ] || [ ! "$HOSTDISPLAYNAME" ] \
+|| [ ! "$SERVICENAME" ] || [ ! "$SERVICEDISPLAYNAME" ] \
+|| [ ! "$SERVICEOUTPUT" ] || [ ! "$SERVICESTATE" ] \
+|| [ ! "$USEREMAIL" ] || [ ! "$NOTIFICATIONTYPE" ]; then
+  Error "Requirement parameters are missing."
+fi
+
+## Build the message's subject
+SUBJECT="[$NOTIFICATIONTYPE] $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE!"
+
+## Build the notification message
+NOTIFICATION_MESSAGE=`cat << EOF
+***** Service Monitoring on $ICINGA2HOST *****
+
+$SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE!
+
+Info:    $SERVICEOUTPUT
+
+When:    $LONGDATETIME
+Service: $SERVICENAME
+Host:    $HOSTNAME
+EOF
 `
 
-/usr/bin/printf "%b" "$template" | mail -s "$NOTIFICATIONTYPE - $HOSTDISPLAYNAME - $SERVICEDISPLAYNAME is $SERVICESTATE" $USEREMAIL
+## Check whether IPv4 was specified.
+if [ -n "$HOSTADDRESS" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+IPv4:    $HOSTADDRESS"
+fi
+
+## Check whether IPv6 was specified.
+if [ -n "$HOSTADDRESS6" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+IPv6:    $HOSTADDRESS6"
+fi
+
+## Check whether author and comment was specified.
+if [ -n "$NOTIFICATIONCOMMENT" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+
+Comment by $NOTIFICATIONAUTHORNAME:
+  $NOTIFICATIONCOMMENT"
+fi
+
+## Check whether Icinga Web 2 URL was specified.
+if [ -n "$ICINGAWEB2URL" ] ; then
+  NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+
+$ICINGAWEB2URL/monitoring/service/show?host=$HOSTNAME&service=$SERVICENAME"
+fi
+
+## Check whether verbose mode was enabled and log to syslog.
+if [ "$VERBOSE" == "true" ] ; then
+  logger "$PROG sends $SUBJECT => $USEREMAIL"
+fi
+
+## Send the mail using the $MAILBIN command.
+## If an explicit sender was specified, try to set it.
+if [ -n "$MAILFROM" ] ; then
+
+  ## Modify this for your own needs!
+
+  ## Debian/Ubuntu use mailutils which requires `-a` to append the header
+  if [ -f /etc/debian_version ]; then
+    /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
+  ## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
+  else
+    /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
+  fi
 
+else
+  /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" \
+  | $MAILBIN -s "$SUBJECT" $USEREMAIL
+fi
index 9c76de7bb02be63b8cf9cf2c5612acd415ef484d..70ac766d86606fc44eaab37ef0157b9b0f6a1b75 100644 (file)
@@ -13,17 +13,29 @@ object Zone ZoneName {
 }
 
 /*
- * Defines a global zone containing templates,
- * etc. synced to all nodes, if they accept
- * configuration. All remote nodes need
- * this zone configured too.
+ * Defines a global zone for distributed setups with masters,
+ * satellites and clients.
+ * This is required to sync configuration commands,
+ * templates, apply rules, etc. to satellite and clients.
+ * All nodes require the same configuration and must
+ * have `accept_config` enabled in the `api` feature.
  */
 
-/*
 object Zone "global-templates" {
   global = true
 }
-*/
+
+/*
+ * Defines a global zone for the Icinga Director.
+ * This is required to sync configuration commands,
+ * templates, apply rules, etc. to satellite and clients.
+ * All nodes require the same configuration and must
+ * have `accept_config` enabled in the `api` feature.
+ */
+
+object Zone "director-global" {
+  global = true
+}
 
 /*
  * Read the documentation on how to configure
index 867502d0e258b40e99425d54fcb451ad1c182f35..cc9e4fbab8a1965dccbd581480b43c61e363c71e 100644 (file)
@@ -1,6 +1,7 @@
 /var/log/icinga2/icinga2.log /var/log/icinga2/debug.log {
        daily
        rotate 7
+       su nagios nagios
        compress
        delaycompress
        missingok
@@ -14,6 +15,7 @@
 /var/log/icinga2/error.log {
        daily
        rotate 90
+       su nagios nagios
        compress
        delaycompress
        missingok