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'
required = true
value = "$notification_hoststate$"
}
+ "-X" = "$notification_hostnotes$"
"-t" = {
required = true
value = "$notification_type$"
notification_hostoutput = "$host.output$"
notification_hoststate = "$host.state$"
notification_useremail = "$user.email$"
+ notification_hostnotes = "$host.notes$"
}
}
required = true
value = "$notification_type$"
}
+ "-X" = "$notification_hostnotes$"
+ "-x" = "$notification_servicenotes$"
"-u" = {
required = true
value = "$notification_servicedisplayname$"
notification_servicestate = "$service.state$"
notification_useremail = "$user.email$"
notification_servicedisplayname = "$service.display_name$"
+ notification_hostnotes = "$host.notes$"
+ notification_servicenotes = "$service.notes$"
}
}
NOTIFICATIONCOMMENT = "$notification.comment$"
HOSTDISPLAYNAME = "$host.display_name$"
USEREMAIL = "$user.email$"
+ HOSTNOTES = "$host.notes$"
}
}
HOSTDISPLAYNAME = "$host.display_name$"
SERVICEDISPLAYNAME = "$service.display_name$"
USEREMAIL = "$user.email$"
+ HOSTNOTES = "$host.notes$"
+ SERVICENOTES = "$service.notes$"
}
}
--- /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.