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
Reg alert mail content
Re: Reg alert mail content
Can you make the change in Admin --> Notification Management --> Email Messages and let me know if that resolves your issue?
Former Nagios Employee.
me.
me.
-
inas.labib
- Posts: 170
- Joined: Tue Sep 11, 2012 3:48 am
Re: Reg alert mail content
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,
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
inas.labib wrote:Can we use this template for only specific services ?
Unless I'm mistaken, you'll need different users set up for the different services if you want to change the message.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.
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.inas.labib wrote:The result is coming in single line as below, can we make it as separate lines ?
Former Nagios Employee.
me.
me.
-
inas.labib
- Posts: 170
- Joined: Tue Sep 11, 2012 3:48 am
Re: Reg alert mail content
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)
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
Please see the post from @hsmith regarding the newlines:
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.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.
Former Nagios employee
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Reg alert mail content
The newline should be \r\n for plain text email and outlook client, or just a <br> for html. (<br /> works too.)
Previous Nagios employee
Re: Reg alert mail content
@inas.labib please let us know if this works out for you.
Former Nagios employee