All Apps and Add-ons

Change background color of specifc column in email alert table

AKG1_old1
Builder

Hello,

I am using sendresults app for email alert. In results table I have one column name as count. I want if any row having count value > 0 then its background color should be red.
alt text

This is the default CSS for results table. Not sure if possible implement my requirement.

table {font-family:Arial;font-size:12px;border: 1px solid black;padding:3px}th {background-color:#4F81BD;color:#fff;border-left: solid 1px #e9e9e9} td {border:solid 1px #e9e9e9}
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@agoyal

I think you have to do some changes in $SPLUNK_HOME/etc/apps/search/bin/sendemail.py (Make sure about this should be done by someone who knows python very well).

Here I suggest making a copy of this script with another name in your app-level bin directory. ( $SPLUNK_HOME/etc/apps/MY_APP/bin/new_sendemail.py )

Now you need point this script by creating $SPLUNK_HOME/etc/apps/MY_APP/local/commands.conf

You will need a [sendemail] section to point to your new script.

[sendemail]
filename = new_sendemail.py
streaming = false
run_in_preview = false

Put your alerts in this app and try this solution.

Make sure your alerts have proper HTML and inline CSS content.

Thanks

0 Karma

mockd
Path Finder

Hi,

Unfortunately that is not possible right now in the current version. CSS doesn't allow you to select by inner HTML values, so more info/attributes would need to be added to the generated HTML to make it work.

This is an interesting idea for a new feature for the app and will add it to our feature list. We are hoping to have a new version out in time for .conf.

Thanks,
Derek.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...