All Apps and Add-ons

css code to color cells with different threshold with sendresult

surekhasplunk
Communicator

Hi,

I am using below code to send email with color alert feature added depending on the thresholds .

So here are two columns where i want this to be implemented but it works only for one column not both. Can someone help me how to add more than one column and still make the color threshold work. 

bla bla ... | eval Column1-class=case(('Column1'<50), "alert", ('Column1'>70), "normal", ('Column1'>50 AND 'Column1'<70), "warning", true(), "N/A") | eval Column2-class=case(('Column2'<50), "alert", ('Column2'>70), "normal", ('Column2'>50 AND 'Column2'<70), "warning", true(), "N/A") | sendresults content_type=html subject="Monthly Report" showsubj=false msgstyle="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} .alert {background-color:red;} .normal {background-color:green;} .warning {background-color:orange;}" format_columns="Column1"  format_columns="Column2"

 

Thanks

Labels (1)
Tags (4)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...