Dashboards & Visualizations

color a column based on its content using xml code

New Member

i have a column status, which will have a message saying "successful" or "unsuccessful",
i want to color the cell green that has successful message
else if unsuccessful color it red.

please help me with the code

0 Karma



      <label>Color Cell</label>
              <query>| makeresults | eval status="successful,unsuccessful",status=split(status,",")| mvexpand status</query>
            <option name="drilldown">none</option>
            <format type="color" field="status">
              <colorPalette type="map">{"successful":#00FF00,"unsuccessful":#FF0000}</colorPalette>

Refer: https://docs.splunk.com/Documentation/Splunk/7.3.1/Viz/TableFormatsXML#Table_format_source_code_exam...

0 Karma
Get Updates on the Splunk Community!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out &gt;&gt; As our brave ...