maybe chown 'nagios' 'icinga2/features-available/graphite.conf'
maybe chgrp 'nagios' 'icinga2/features-available/graphite.conf'
maybe chmod 0644 'icinga2/features-available/graphite.conf'
+maybe chown 'nagios' 'icinga2/features-available/icingadb.conf'
+maybe chgrp 'nagios' 'icinga2/features-available/icingadb.conf'
+maybe chmod 0644 'icinga2/features-available/icingadb.conf'
maybe chown 'nagios' 'icinga2/features-available/ido-pgsql.conf'
maybe chgrp 'nagios' 'icinga2/features-available/ido-pgsql.conf'
maybe chmod 0600 'icinga2/features-available/ido-pgsql.conf'
--- /dev/null
+object IcingaDB "icingadb" {
+ //host = "127.0.0.1"
+ //port = 6380
+ //password = "xxx"
+}
object OpenTsdbWriter "opentsdb" {
//host = "127.0.0.1"
//port = 4242
+ //enable_generic_metrics = false
+
+ // Custom Tagging, refer to Icinga object type documentation for
+ // OpenTsdbWriter
+ //host_template = {
+ // metric = "icinga.host"
+ // tags = {
+ // zone = "$host.zone$"
+ // }
+ //}
+ //service_template = {
+ // metric = "icinga.service.$service.check_command$"
+ // tags = {
+ // zone = "$service.zone$"
+ // }
+ //}
}
fi
## Check whether verbose mode was enabled and log to syslog.
-if [ "$VERBOSE" == "true" ] ; then
+if [ "$VERBOSE" = "true" ] ; then
logger "$PROG sends $SUBJECT => $USEREMAIL"
fi
## Debian/Ubuntu use mailutils which requires `-a` to append the header
if [ -f /etc/debian_version ]; then
- /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
- | $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
+ /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" | tr -d '\015' \
- | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
+ /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
fi
else
- /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
+ /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" \
| $MAILBIN -s "$SUBJECT" $USEREMAIL
fi
fi
## Check whether verbose mode was enabled and log to syslog.
-if [ "$VERBOSE" == "true" ] ; then
+if [ "$VERBOSE" = "true" ] ; then
logger "$PROG sends $SUBJECT => $USEREMAIL"
fi
## Debian/Ubuntu use mailutils which requires `-a` to append the header
if [ -f /etc/debian_version ]; then
- /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
- | $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
+ /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" | tr -d '\015' \
- | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
+ /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
fi
else
- /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
+ /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" \
| $MAILBIN -s "$SUBJECT" $USEREMAIL
fi