Is there a way to include the hostgroup in the email group? Reason being we have 1000+ hosts and they are belong to different applications and the naming convention for the host does not tell me which application is having an issue. But we did define these hosts to hostgroup(application group), so it is possible to include the hostgroup in the email alert so we know which application it is coming from?
This is the default notify command we use
Code: Select all
/usr/bin/printf "%b" "***** Nagios XI Monitoring*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nHostgroup: $HOSTGROUPALIAS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/local/bin/sendEmail -s $USER7$ -t $CONTACTEMAIL$ -cc "$USER10$" -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ MCOM_RTP Host Alert: $HOSTNAME$ **" -m "***** Nagios XI Monitoring *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n"