+# -n: Don't send pings
+# -d: Don't try to auth
+# -S: sender (use non-default to allow muting separately in e.g. Zulip)
+# -s: zsig
+
# 'host-notify-by-zephyr' command definition
define command{
command_name host-notify-by-zephyr
- command_line /usr/bin/printf "%b" "Host $HOSTSTATE$ $NOTIFICATIONTYPE$ alert for $HOSTNAME$!\n$HOSTOUTPUT$\n$LONGHOSTOUTPUT$" | /usr/bin/zwrite -d -s "Nagios" -i "nagios.$HOSTALIAS$" "$CONTACTADDRESS1$"
+ command_line /usr/bin/printf "%b" "Host $HOSTSTATE$ $NOTIFICATIONTYPE$ alert for $HOSTNAME$!\n$HOSTOUTPUT$\n$LONGHOSTOUTPUT$" | /usr/bin/zwrite -n -d -S nagios-adehnert -s "Nagios" -c "$CONTACTEMAIL$" -i "nagios.$HOSTALIAS$" "$CONTACTADDRESS1$"
}
# 'notify-by-zephyr' command definition
define command{
command_name notify-by-zephyr
- command_line /usr/bin/printf "%b" "$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGSERVICEOUTPUT$" | /usr/bin/zwrite -d -s "Nagios" -i "nagios.$HOSTALIAS$.$SERVICEDESC$" "$CONTACTADDRESS1$"
+ command_line /usr/bin/printf "%b" "$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGSERVICEOUTPUT$" | /usr/bin/zwrite -n -d -S nagios-adehnert -s "Nagios" -c "$CONTACTEMAIL$" -i "nagios.$HOSTALIAS$.$SERVICEDESC$" "$CONTACTADDRESS1$"
}
define host{
name adehnert-host
use generic-host
+ contact_groups adehnert-pub
notification_interval 240
max_check_attempts 5
register 0
hostgroup_name adehnert-minions
service_description SERVICES-ALL
check_command check_byssh_generic!check_services_all
+ contact_groups adehnert-priv
}
define service {
members adehnert-pub-zephyr
}
+define contactgroup {
+ contactgroup_name adehnert-priv
+ alias adehnert-priv
+ members adehnert-priv-zephyr
+}
+
define contact {
contact_name adehnert-pub-zephyr
alias adehnert-pub-zephyr
service_notification_commands notify-by-zephyr
host_notification_commands host-notify-by-zephyr
email adehnert-auto
+ # Intentionally blank, so message is public
+ address1
+}
+
+
+define contact {
+ contact_name adehnert-priv-zephyr
+ alias adehnert-priv-zephyr
+ service_notification_period 24x7
+ host_notification_period 24x7
+ service_notification_options w,u,c,r
+ host_notification_options d,u,r
+ service_notification_commands notify-by-zephyr
+ host_notification_commands host-notify-by-zephyr
+ email message
address1 adehnert
}