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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...