I currently have alerts that have been created and mails that are sent to me but when i receive alerts and notifications it uses the ip address. This is a security risk. I would like to fin out if there's a way to mitigate that and have the alerts show NULL value or no value with the address section:
Host: server2302
Alias: OpenAM_prod
Address: xx.xxx.194.15
Service: NTP Time
State: CRITICAL -> OK (RECOVERY)
Command: check_mk-ntp.time
Output: OK - sys.peer - stratum 2, offset -20.00 ms, jitter 14.27 ms, last reached 60 secs ago (synchronized on xx.xx.248.20)
Perfdata: offset=-20.005;200;500;0; jitter=14.274;200;500;0;
Hide ipaddress from showing on sendmail alerts
Re: Hide ipaddress from showing on sendmail alerts
Are you using Nagios XI, or Nagios Core?
Regardless, you should be able to modify the notification commands, and remove the part that mentions the $HOSTADDRESS$ macro. For example -
Remove the \nAddress: $HOSTADDRESS$ part -
If it's XI, you'll want to modify the email template associated with the user.
Regardless, you should be able to modify the notification commands, and remove the part that mentions the $HOSTADDRESS$ macro. For example -
Code: Select all
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
Code: Select all
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
Former Nagios Employee