Different notification contents for different users
Re: Different notification contents for different users
They've already modified their notifications, so that's been changed. Now I'm just trying to resole the newlines in the extended info, if we can have multiple lines there. And we upgraded to Enterprise today so I can have those additional features. 
- Kyle
Re: Different notification contents for different users
hhlodge wrote:They've already modified their notifications, so that's been changed. Now I'm just trying to resole the newlines in the extended info, if we can have multiple lines there. And we upgraded to Enterprise today so I can have those additional features.
Just to verify, you have defined the long output for the user specific notification? Could you post screenshot of that portion of the notification template?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Different notification contents for different users
If you meant "long" output, yes - we all see it now. As for notification template, I don't know what you want. I have service and contact templates. Is one of those what you want to see? Regardless, I still don't know how this affects the newlines in the expansion of $LONGSERVICEOUTPUT$.
- Kyle
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Different notification contents for different users
I believe what Andy is looking for is the Notification Messages template by clicking on the username (top right) and the Notification Messages
Re: Different notification contents for different users
Here is mine. I Just see "\n" in the extended info as well.
Code: Select all
***** Nagios XI Alert *****
Notification Type: %type%
Service: %service%
Host: %hostalias%
Address: %hostaddress%
State: %servicestate%
Info: %serviceoutput%
Extended info: %longserviceoutput%
Date/Time: %datetime%
Author: %author%
Comment: %comments%
Notified: %notificationrecipients%
Respond: %responseurl%
Nagios URL: %xiserverurl%
- Kyle
Re: Different notification contents for different users
hmmm. Looks like the "\n" is not getting parsed as a newline in the notification component. We may have to use a crafty escaped shell command for the notification command as a bandaid until we can hunt down the fix:
I tested it, it works. It replaces "\n" with "<br />". Ugly, but it works.
Code: Select all
--longserviceoutput="$$(echo "$LONGSERVICEOUTPUT$" | sed 's/\\n/<br \/>/g' )" Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Different notification contents for different users
I'll take ugly any day - works great. Thank you!
- Kyle
Re: Different notification contents for different users
Great! Glad it works for you as well, though the escaping is definitely odd. Anything else or shall we lock this thread?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Different notification contents for different users
All good - lock it. Good to know we can use shell commands in there.
- Kyle