From 41fe0ec74efa59c44416ed00e984bde2d9b64672 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Fri, 15 Nov 2019 21:18:08 +0000 Subject: [PATCH] add in nagios patches from karsten --- .../nagios_server/files/nagios/commands/notify.cfg | 14 ++++++++++++++ roles/nagios_server/tasks/main.yml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/roles/nagios_server/files/nagios/commands/notify.cfg b/roles/nagios_server/files/nagios/commands/notify.cfg index 0d07087d2f..a20b1d8f94 100644 --- a/roles/nagios_server/files/nagios/commands/notify.cfg +++ b/roles/nagios_server/files/nagios/commands/notify.cfg @@ -58,6 +58,20 @@ define command{ command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTNAME$", "state": "$SERVICESTATE$", "service": "$SERVICEDESC$", "output": "$SERVICEOUTPUT$", "host_ack_author": "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedmsg-logger --cert-prefix nagios --modname nagios --topic service.state.change --json-input } +# 'host-notify-by-fedora-messaging' command definition +define command{ + command_name host-notify-by-fedora-messaging + command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTNAME$", "state": "$HOSTSTATE$", "output": "$HOSTOUTPUT$", "host_ack_author": "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedora-messaging-logger --cert-prefix nagios --modname nagios --topic host.state.change --json-input + } + +# 'notify-by-fedora-messaging' command definition +define command{ + command_name notify-by-fedora-messaging + command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTNAME$", "state": "$SERVICESTATE$", "service": "$SERVICEDESC$", "output": "$SERVICEOUTPUT$", "host_ack_author" "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedora-messaging-logger --cert-prefix nagios --modname nagios --topic service.state.change --json-input + } + + + # 'notify-by-xmpp' command definition #define command{ # command_name notify-by-xmpp diff --git a/roles/nagios_server/tasks/main.yml b/roles/nagios_server/tasks/main.yml index 13de18b0c7..7c9aa42ef1 100644 --- a/roles/nagios_server/tasks/main.yml +++ b/roles/nagios_server/tasks/main.yml @@ -191,7 +191,7 @@ - db_backups.cfg - disk.cfg - dns.cfg - - fedmsg.cfg + - fedora-messaging.cfg - file_age.cfg - fmn.cfg - haproxy.cfg