New notifications in 1.5

Having issues? Post them here, and help other users.
Post Reply
JatBee
Junior Member
Posts: 42
Joined: Sat Nov 11, 2017 3:54 pm

New notifications in 1.5

Post by JatBee »

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
JatBee
Junior Member
Posts: 42
Joined: Sat Nov 11, 2017 3:54 pm

RE: New notifications in 1.5

Post by JatBee »

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
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: New notifications in 1.5

Post by Robbie Ferguson »

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.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
Post Reply