Category5.TV Community Forum

Full Version: New notifications in 1.5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I just imported all my stuff from 1.4.1 to 1.5 - and it just worked. Very cool.

It might have worked too well in fact - I think it brought over my old notification formats, and I was hoping for the nifty new HTML notifications for 1.5

There is probably something simple I am overlooking, but how can I get the new ones? The "notify-host-by-email" etc object I think were imported in the old version. I may resort to bringing up another nems and seeing what the new ones look like before I import.

Thoughts?


jim
Answering my own post. I guess this explains why I am always talking to myself.

On the discord channel - and got the answer to this one straight up. Hopefully someone finds this useful.

From the BN himself:
Edit notify_host_by_email as follows:
$USER1$/nems_sendmail_host "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTALIAS$" "$HOSTSTATE$" "$HOSTADDRESS$" "$HOSTOUTPUT$" "$SHORTDATETIME$" "$CONTACTEMAIL$" "$TOTALHOSTSUP$" "$TOTALHOSTSDOWN$" "$NOTIFICATIONAUTHOR$" "$NOTIFICATIONCOMMENT$" "$LONGDATETIME$" "$HOSTDURATION$" "$HOSTDURATIONSEC$" "$LASTHOSTCHECK$" "$LASTHOSTSTATECHANGE$" "$NOTIFICATIONISESCALATED$" "$HOSTATTEMPT$" "$MAXHOSTATTEMPTS$" "$NOTIFICATIONRECIPIENTS$"

Edit notify_service_by_email as follows:
$USER1$/nems_sendmail_service "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTALIAS$" "$HOSTSTATE$" "$HOSTADDRESS$" "$SERVICEOUTPUT$" "$SHORTDATETIME$" "$SERVICEDESC$" "$SERVICESTATE$" "$CONTACTEMAIL$" "$SERVICEDURATIONSEC$" "$SERVICEEXECUTIONTIME$" "$TOTALSERVICESWARNING$" "$TOTALSERVICESCRITICAL$" "$TOTALSERVICESUNKNOWN$" "$LASTSERVICEOK$" "$LASTSERVICEWARNING$" "$SERVICENOTIFICATIONNUMBER$" "$LONGSERVICEOUTPUT$" "$NOTIFICATIONAUTHOR$" "$NOTIFICATIONCOMMENT$" "$SERVICEDURATION$" "$NOTIFICATIONISESCALATED$" "$SERVICEATTEMPT$" "$MAXSERVICEATTEMPTS$" "$NOTIFICATIONRECIPIENTS$"


Works a treat.

jfb
Thank you for posting this JatBee.

For those who are new to NEMS or aren't sure where to go, the fix JatBee mentions above is applied by editing the appropriate notification setting under misccommands in NEMS NConf.

Don't forget to also generate your config, which applies the new settings.