From 44d35b5bd429bcf68e8cea6eace053a5a56d16e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 6 Jun 2023 15:48:49 +0200 Subject: [PATCH] nagios email hostname --- roles/nagios/files/commands.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nagios/files/commands.cfg b/roles/nagios/files/commands.cfg index 3cd0a0a..6a1f8dc 100644 --- a/roles/nagios/files/commands.cfg +++ b/roles/nagios/files/commands.cfg @@ -11,7 +11,7 @@ # 'notify-host-by-email' command definition define command{ command_name notify-host-by-email - command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ + command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nServer : $HOSTNAME$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ } # 'notify-service-by-email' command definition