Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Problem changing cell color in dashboard

$
0
0
Using Splunk Enterprise v7.2.1 I'm creating a dashboard and want to change the colors of some of my cells based on the field value. I'm having a very hard time getting this to work as expected. What happens is that if ANY of the fields in the column match the if(like)) condition, ALL of the cells are set to that color. If none of the cell match, then they're set to the NOT IF color. Here're the format lines from the XML (they follow the option tags): if(like(value,"%available"), "#00F000", "#F00000")if(like(value,"%Nope"), "#00F000", "#F00000") And here's what the output looks like:![alt text][1] I purposely chose a string that doesn't match anything in the "Status" column to illustrate what's happening here. I'm using unicode characters because I don't want to mess with icons, java, and .css files just now - the formats behave the same way if I remove the characters anyway. I've also tried if(value=="whatever", "#00F000", "#F00000") as well as if(match(...),...) to no avail. The query I'm using is: | from datamodel:"bigip-tmsh-pool_member_status.all" | eval check="✅" | eval warn="⚠️" | eval error="❌" | eval critical="☠️" | where host=$host$ AND pool_name="$pool_name$" | dedup pool_member_name | sort enabled_state availability_state | eval availability_state=if(availability_state="offline", error.availability_state.error, check.availability_state) | eval enabled_state=if(enabled_state="disabled", critical.enabled_state.critical, check.enabled_state) | convert ctime(_time) as event_time | sort pool_member_name | stats list(event_time) as "Last Checkin" list(pool_member_name) as "Pool Member" list(availability_state) as "Availability" list(enabled_state) as "Status" list(status_reason) as "Status Msg" I'm at a loss and would appreciate any assistance. [1]: /storage/temp/274911-2019-10-14-14-23-58-window.png

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>