Page 1 of 2

Changes to email template

Posted: Fri Oct 27, 2017 12:16 pm
by saleemthupsee
Hello,

I made some changes in the order of variables in nagiosxi email template and it has stopped sending email.

Could you please advise. I tried reverting my changes and it's still not working.

Saleem

Re: Changes to email template

Posted: Fri Oct 27, 2017 12:39 pm
by kyang
Hi @saleemthupsee,

Could you post the changes to your email template? Or post what you have now as an email template?

Can you also tell us how you know it's not working?

Re: Changes to email template

Posted: Mon Oct 30, 2017 6:57 am
by saleemthupsee
Hello Kyan,

here is a small modification I have made to customize the email template and applied it to the xi_contact_all users group.

Email are not received anymore.

please see attached picture of custom template.

Re: Changes to email template

Posted: Mon Oct 30, 2017 7:09 am
by saleemthupsee
hello Kyan,

additionnal note :
custom manual notifications are received but not the xi_notification_service handler which used to send me emails in any situation of errors occuring on the service. All my other custom notifications for the user are still working. I added two other custom notification other than the xi_notification_service. They show up in the list of notifications being sent out ....

Saleem

Re: Changes to email template

Posted: Mon Oct 30, 2017 8:11 am
by saleemthupsee
Hello Kyang,

should xi_default_contact be active or not ? Currently mine is inactive.

Saleem

Re: Changes to email template

Posted: Mon Oct 30, 2017 11:19 am
by kyang
Who are you using for contacts if xi_default_contact is not active? Click it to active and save the configuration.

Also try changing the Service Alert Subject to this --> %type% Service Alert! - %host%/%service% is %servicestate%

When you say custom manual notifications --> do you mean you are using something else and not the xi_notification_service handler?

Can you post your mail logs?

Code: Select all

tail -100 /var/log/maillog

Re: Changes to email template

Posted: Thu Nov 09, 2017 5:11 am
by saleemthupsee
Hello attached the mail logs.

Email has started to work again after leaving everything for a few days and verifying that each user had the proper xi_notification_handlers in the ir contact accounts.

Now there is one user that is not receiving the changes made to the new email template I have created. How do i check which email template a user '(alain.loizeau) is affected a particular template ?

In the notification logs that user is being notified. However, the user is not receiving his emails....

Re: Changes to email template

Posted: Thu Nov 09, 2017 11:57 am
by kyang
Glad to hear you are receiving email notifications again!

In the maillog you have a lot of these. (status=bounced)
Nov 9 11:05:03 localhost postfix/local[28238]: 042BF98D: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.18, delays=0.13/0.03/0/0.03, dsn=5.2.2, status=bounced (cannot update mailbox /var/mail/root for user root. error writing message: File too large)
Nov 9 11:05:03 localhost postfix/cleanup[28233]: 17806990: message-id=<[email protected]>
Nov 9 11:05:03 localhost postfix/qmgr[1583]: 17806990: from=<>, size=4399, nrcpt=1 (queue active)
Nov 9 11:05:03 localhost postfix/bounce[28239]: 042BF98D: sender non-delivery notification: 17806990
Nov 9 11:05:03 localhost postfix/qmgr[1583]: 042BF98D: removed
Nov 9 11:05:03 localhost postfix/local[28238]: 17806990: to=<[email protected]>, relay=local, delay=0, delays=0/0/0/0, dsn=5.2.2, status=bounced (cannot update mailbox /var/mail/root for user root. error writing message: File too large)
So I just want to make sure things are solved for you?

As for which email template a user has, log in as the user (alain.loizeau) -- Go to the upper right corner and click the name --> On the left side click "Notification messages"

There you should see which email template the user has.

Let us know if you have any more questions!

Re: Changes to email template

Posted: Tue Nov 14, 2017 5:07 am
by saleemthupsee
Hello,

really awesome, to have notification per user, which makes it easier than to use the general administration console.

Also is it possible to set the font size and colors in the email template ? If so how ?


best regards,
SAleem
Paris

Re: Changes to email template

Posted: Tue Nov 14, 2017 10:39 am
by kyang
It is pretty awesome! Did that resolve your issue for you?

It's possible if you know some CSS. Otherwise here's an article with an email template for host/service that will display emails in color.

https://support.nagios.com/kb/article.php?id=527

Did you have any more questions or are we okay to lock up this thread?