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
Get Updates on the Splunk Community!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...