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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...