Page 1 of 1
Reg alert mail content
Posted: Mon Nov 30, 2015 5:08 am
by inas.labib
Hi ,
We use Nagios XI 5.2.2.
In the notification mail, Nagios is sending only the first line of the error. We need all lines(complete error output) to be displayed in the alert mail .We tried adding $LONGSERVICEOUTPUT$ in "notify-service-by-email" command , still no use. Please assist.
Alert in Nagios:
Error: Threshold-0 DB Value-13
ABC Customer has "0" Trans in 1 Minute. Time Frame is :-- 29-NOV-2015 to 30-NOV-2015
Mail content :
Error: Threshold-0 DB Value-13
Thanks
Re: Reg alert mail content
Posted: Mon Nov 30, 2015 11:31 am
by hsmith
Can you make the change in Admin --> Notification Management --> Email Messages and let me know if that resolves your issue?
Re: Reg alert mail content
Posted: Tue Dec 01, 2015 2:11 am
by inas.labib
Hi ,
Tried as suggested , its working ..
i) Can we use this template for only specific services ?
ii) The result is coming in single line as below, can we make it as separate lines ?
State: CRITICAL
Info:
Tue Dec 1 03:13:17 GST 2015\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 4128497\nEngine version: 0.98.7\nScanned directories: 30286\nScanned files: 278755\nInfected files:89\nData scanned: 16748.23 MB\nData read: 12005.41 MB (ratio 1.40:1)\nTime: 3813.243 sec (63 m 33 s)
Thanks,
Re: Reg alert mail content
Posted: Tue Dec 01, 2015 10:34 am
by hsmith
inas.labib wrote:Can we use this template for only specific services ?
This page allows for notification settings to be saved and deployed to all users, a selection of users, or users in a selection contact groups. This component will only update notification settings for contacts that are created by Nagios XI, or contacts created according to the XI Users and Contacts. Unless notification settings are locked, all users can still modify their own notification settings from the Configure->My Account Settings-> Notification Options page.
Unless I'm mistaken, you'll need different users set up for the different services if you want to change the message.
inas.labib wrote:The result is coming in single line as below, can we make it as separate lines ?
The \n should be a newline. It could be filtered by your email client. You could try <BR> after each line if HTML isn't filtered.
Re: Reg alert mail content
Posted: Sun Oct 02, 2016 9:11 am
by inas.labib
We still receive nagios notification mails as below.
We use Outlook , kindly advice is there any settings we need to modify @ Outlook client side.
State: CRITICAL
Info:
Tue Dec 1 03:13:17 GST 2015\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 4128497\nEngine version: 0.98.7\nScanned directories: 30286\nScanned files: 278755\nInfected files:89\nData scanned: 16748.23 MB\nData read: 12005.41 MB (ratio 1.40:1)\nTime: 3813.243 sec (63 m 33 s)
Re: Reg alert mail content
Posted: Mon Oct 03, 2016 10:19 am
by tmcdonald
Please see the post from
@hsmith regarding the newlines:
hsmith wrote:The \n should be a newline. It could be filtered by your email client. You could try <BR> after each line if HTML isn't filtered.
Your email client might be assuming the email is in HTML, so the
\n is treated as two separate characters. You can try changing those to
<br /> instead of
\n if that is the case. Otherwise you will need to speak to your mail admin as that is an Outlook setting.
Re: Reg alert mail content
Posted: Mon Oct 03, 2016 10:30 am
by avandemore
The newline should be \r\n for plain text email and outlook client, or just a <br> for html. (<br /> works too.)
Re: Reg alert mail content
Posted: Tue Oct 04, 2016 11:10 am
by tmcdonald
@inas.labib please let us know if this works out for you.