How to get Alert mail in HTML format [Solved]

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
msachikanta
Posts: 58
Joined: Tue Jan 03, 2012 2:35 am

How to get Alert mail in HTML format [Solved]

Post by msachikanta »

Hi,

Currently the alert mails are being sent from Nagios in Plain Text format. Is there any way to convert the format to HTML while sending from Nagios...? Please advise.

Thanks in advance.

Regards,
Sachikanta
Last edited by msachikanta on Wed Jun 20, 2012 7:44 am, edited 1 time in total.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: How to get Alert mail in HTML format

Post by agriffin »

In the default configuration, the notification commands are located in commands.cfg under the names notify-host-by-email and notify-service-by-email. Have a look at those and edit them to include whatever HTML you need.
msachikanta
Posts: 58
Joined: Tue Jan 03, 2012 2:35 am

Re: How to get Alert mail in HTML format

Post by msachikanta »

Thanks for your information.. but i got a way to sending alert mail in html format. but after following the steps I am not able to receive a single mail itself.

Here is the link from where i got information.

http://exchange.nagios.org/directory/Ad ... v2/details

Could you please help me on this..!

Thanks in advance.

Regards,
Sachikanta
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: How to get Alert mail in HTML format

Post by agriffin »

The script you picked out uses PHP's basic mail function to send out alerts. This is configured in php.ini, so you may want to take a look there to make sure things look right.
msachikanta
Posts: 58
Joined: Tue Jan 03, 2012 2:35 am

Re: How to get Alert mail in HTML format [Solved]

Post by msachikanta »

Yes.. I have done the changes as per my requirement and getting alert email in html format now.. It's so cool.... looks very nice and easy to understand.

Thanks,
Sachikanta
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: How to get Alert mail in HTML format [Solved]

Post by agriffin »

Glad to hear it!
Locked