notifications icon indicating copy to clipboard operation
notifications copied to clipboard

Include HTML (Content-Type: text/html) in email destination.

Open adityaj1107 opened this issue 4 years ago • 7 comments

Issue by Sampathreddygopireddy118 Thursday Dec 10, 2020 at 14:42 GMT Originally opened as https://github.com/opendistro-for-elasticsearch/alerting/issues/324


Is your feature request related to a problem? Please describe. currently email destination only supports (plain/text).

Describe the solution you'd like It is really good to have the (Content-Type: text/html) in email destination.

Describe alternatives you've considered Currently I using custom webhook destination for email notification.

adityaj1107 avatar Jun 02 '21 21:06 adityaj1107

Comment by anjanaasok Monday Mar 08, 2021 at 09:36 GMT


@Sampathreddygopireddy118 can you share the custom webhook that you created, How did you pass the context over to webhoook. DO we pass the ctx object in the URL of webhook

adityaj1107 avatar Jun 02 '21 21:06 adityaj1107

Comment by Sampathreddygopireddy118 Tuesday Mar 09, 2021 at 15:45 GMT


I was able to do the HTML format for email using custom webhook (destination as jenkins (generic-webhook-trigger)). Below are the steps if someone wants to do it. Steps:

Message info in opendistro alerting write your message including painless script and include html tags. create a free-style jenkins job -> enable the generic webhook trigger-> provide the variable to receive text format from kibana (custom webhook). enable/create execute shell in Build, and write the incoming text (variable assigned in generic webhook) to a file with html extention (echo $variable > email.html). enable editable email notification in your post build. Follow the steps from the document below. https://dzone.com/articles/jenkins-convert-excel-data-to-tabular-format-and-s Hope this helps. Let me know if you need any other details. My email: [email protected]

adityaj1107 avatar Jun 02 '21 21:06 adityaj1107

Closing as solved.

brijos avatar Apr 05 '22 17:04 brijos

Closing as solved.

brijos avatar Apr 05 '22 17:04 brijos

@brijos, could you please clarify if native HTML support has been added?

qmonitoring avatar Aug 24 '22 18:08 qmonitoring

Thanks @qmonitoring. It was not fixed as asked so I reopened it. There is a workaround as Sampath calls out though.

brijos avatar Aug 25 '22 16:08 brijos

There is another issue https://github.com/opensearch-project/notifications/issues/586 that we are working on right now.

xluo-aws avatar Jun 15 '23 08:06 xluo-aws