All Apps and Add-ons

css code to color cells with different threshold with sendresult



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"



Labels (1)
Tags (4)
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Customer Survey!

If you use Splunk Observability Cloud, we invite you to share your valuable insights with us through a brief ...

.conf23 | Get Your Cybersecurity Defense Analyst Certification in Vegas

We’re excited to announce a new Splunk certification exam being released at .conf23! If you’re going to Las ...

Starting With Observability: OpenTelemetry Best Practices

Tech Talk Starting With Observability: OpenTelemetry Best Practices Tuesday, October 17, 2023   |  11AM PST / ...