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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...