Alerting

How to have html tags displayed as text in alert?

sathiyasun
Explorer

html.JPGWe need to use HTML tags in alert email body, right now whatever the tag we pass, they are considered as text and displayed in the email as it is. As per below suggested solution we need to update sendemail.py file in splunk server.

https://community.splunk.com/t5/Alerting/How-to-add-HTML-markups-to-alert-email/m-p/524453

Is there any other way to achieve this? Need help on this.

Labels (2)
Tags (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

I'd suggest that you don't touch the built-in sendemail.py but rather copy it as a new script and copy the alert action definition along with it. This way you won't lose your modifications after upgrade.

Secondly, if it's possible, I'd rather modify the template if you want to have some formatted header or something like that. Pasting external data (especially if it's a raw event data) to be rendered as html, possibly with included js, is not a great idea.

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...