I have a simple timechart that looks at the _internal index for various hosts and makes a simple timechart span by hour. I trellis this by host so I get say 8 medium sized timecharts that show log counts over the last 3 days. Sometimes, some of these hosts go down and the value obviously goes to zero.
How do I make the background panel for that host colored red when any of the values is zero? In other words, I want to capture the attention of my users when any of the hosts have a time when there are no logs. If this isn't possible, I'd be open to other suggestions that would get a users attention. I already have alerts set up as well, but this dashboard is also important, and I want to make it easier to capture the user's attention.
| tstats count where index=_internal host=myhost00* by host_time prestats=t span=1h
| timechart span=1h count by host
Final working SPL. Since I have multiple hosts, I just broke them down into individual searches and removed the <panel> tags to make them look like one big panel.
<dashboard>
<label>Test Dashboard</label>
<row>
<panel>
<chart>
<search id="pre">
<query>| tstats count where index=_internal host=system1 BY host _time prestats=t span=1h
| timechart span=1h count AS mycount
</query>
<earliest>-48h@h</earliest>
<latest>@h</latest>
</search>
<option name="charting.backgroundColor">$myColorToken$</option>
<option name="charting.chart">line</option>
<option name="charting.drilldown">none</option>
<option name="refresh.display">preview</option>
</chart>
</panel>
</row>
<search base="pre">
<query>| stats min(mycount) AS mincount</query>
<done>
<eval token="myColorToken">if($result.mincount$<=0,"red","white")</eval>
</done>
</search>
</dashboard>
... View more