maybe chmod 0644 'icinga2/conf.d/api-users.conf'
maybe chown 'nagios' 'icinga2/constants.conf'
maybe chgrp 'nagios' 'icinga2/constants.conf'
-maybe chmod 0644 'icinga2/constants.conf'
+maybe chmod 0640 'icinga2/constants.conf'
maybe chown 'nagios' 'icinga2/constants.conf.orig'
maybe chgrp 'nagios' 'icinga2/constants.conf.orig'
maybe chmod 0640 'icinga2/constants.conf.orig'
maybe chown 'nagios' 'icinga2/features-available/influxdb2.conf'
maybe chgrp 'nagios' 'icinga2/features-available/influxdb2.conf'
maybe chmod 0644 'icinga2/features-available/influxdb2.conf'
+maybe chown 'nagios' 'icinga2/features-available/journald.conf'
+maybe chgrp 'nagios' 'icinga2/features-available/journald.conf'
+maybe chmod 0644 'icinga2/features-available/journald.conf'
maybe chown 'nagios' 'icinga2/features-available/livestatus.conf'
maybe chgrp 'nagios' 'icinga2/features-available/livestatus.conf'
maybe chmod 0644 'icinga2/features-available/livestatus.conf'
--- /dev/null
+/**
+ * The JournaldLogger type writes log information to the systemd journal.
+ */
+
+object JournaldLogger "journald" {
+ severity = "warning"
+}
Optional parameters:
-4 HOSTADDRESS (\$address\$)
-6 HOSTADDRESS6 (\$address6\$)
+ -X HOSTNOTES (\$host.notes\$)
-b NOTIFICATIONAUTHORNAME (\$notification.author\$)
-c NOTIFICATIONCOMMENT (\$notification.comment\$)
-i ICINGAWEB2URL (\$notification_icingaweb2url\$, Default: unset)
}
## Main
-while getopts 4:6::b:c:d:f:hi:l:n:o:r:s:t:v: opt
+while getopts 4:6::b:c:d:f:hi:l:n:o:r:s:t:v:X: opt
do
case "$opt" in
4) HOSTADDRESS=$OPTARG ;;
l) HOSTNAME=$OPTARG ;; # required
n) HOSTDISPLAYNAME=$OPTARG ;; # required
o) HOSTOUTPUT=$OPTARG ;; # required
+ X) HOSTNOTES=$OPTARG ;;
r) USEREMAIL=$OPTARG ;; # required
s) HOSTSTATE=$OPTARG ;; # required
t) NOTIFICATIONTYPE=$OPTARG ;; # required
IPv6: $HOSTADDRESS6"
fi
+## Check whether host notes was specified.
+if [ -n "$HOSTNOTES" ] ; then
+ NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+Host notes: $HOSTNOTES"
+fi
+
## Check whether author and comment was specified.
if [ -n "$NOTIFICATIONCOMMENT" ] ; then
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
if [ -n "$ICINGAWEB2URL" ] ; then
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
-$ICINGAWEB2URL/monitoring/host/show?host=$(urlencode "$HOSTNAME")"
+$ICINGAWEB2URL/icingadb/host?name=$(urlencode "$HOSTNAME")"
fi
## Check whether verbose mode was enabled and log to syslog.
Optional parameters:
-4 HOSTADDRESS (\$address\$)
-6 HOSTADDRESS6 (\$address6\$)
+ -X HOSTNOTES (\$host.notes\$)
+ -x SERVICENOTES (\$service.notes\$)
-b NOTIFICATIONAUTHORNAME (\$notification.author\$)
-c NOTIFICATIONCOMMENT (\$notification.comment\$)
-i ICINGAWEB2URL (\$notification_icingaweb2url\$, Default: unset)
}
## Main
-while getopts 4:6:b:c:d:e:f:hi:l:n:o:r:s:t:u:v: opt
+while getopts 4:6:b:c:d:e:f:hi:l:n:o:r:s:t:u:v:X:x: opt
do
case "$opt" in
4) HOSTADDRESS=$OPTARG ;;
i) ICINGAWEB2URL=$OPTARG ;;
l) HOSTNAME=$OPTARG ;; # required
n) HOSTDISPLAYNAME=$OPTARG ;; # required
+ X) HOSTNOTES=$OPTARG ;;
+ x) SERVICENOTES=$OPTARG ;;
o) SERVICEOUTPUT=$OPTARG ;; # required
r) USEREMAIL=$OPTARG ;; # required
s) SERVICESTATE=$OPTARG ;; # required
IPv6: $HOSTADDRESS6"
fi
+## Check whether host notes was specified.
+if [ -n "$HOSTNOTES" ] ; then
+ NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+Host notes: $HOSTNOTES"
+fi
+
+## Check whether service notes was specified.
+if [ -n "$SERVICENOTES" ] ; then
+ NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
+Service notes: $SERVICENOTES"
+fi
+
## Check whether author and comment was specified.
if [ -n "$NOTIFICATIONCOMMENT" ] ; then
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
if [ -n "$ICINGAWEB2URL" ] ; then
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
-$ICINGAWEB2URL/monitoring/service/show?host=$(urlencode "$HOSTNAME")&service=$(urlencode "$SERVICENAME")"
+$ICINGAWEB2URL/icingadb/service?name=$(urlencode "$SERVICENAME")&host.name=$(urlencode "$HOSTNAME")"
fi
## Check whether verbose mode was enabled and log to syslog.