notifications
notifications copied to clipboard
Include HTML (Content-Type: text/html) in email destination.
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.
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
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]
Closing as solved.
Closing as solved.
@brijos, could you please clarify if native HTML support has been added?
Thanks @qmonitoring. It was not fixed as asked so I reopened it. There is a workaround as Sampath calls out though.
There is another issue https://github.com/opensearch-project/notifications/issues/586 that we are working on right now.