28 Jan 2025 06:53 PM
I have a requirement to create a dashboard panel to show the newest date for a particular log entry and highlight it, if it's older than today's date.
I've created a panel that pulls this information via the following DQL into a single value panel -
fetch logs
| filter //some filter criteria
| summarize max_timestamp = max(timestamp)
This shows up as the following panel in the dashboard.
Now, in order to highlight the text in red if the date is less than today's date, I went to the thresholds but could not find a way to select the variable to set this.
How can I set a threshold for the timestamp value to show up in red color if it's older than today's date?
Thank you!
Solved! Go to Solution.
28 Jan 2025 10:12 PM
Unfortunately it doesn't look like this is possible at the moment. It would be great to see that so it would be a good suggestion for the ideas section of the forum. In the meantime you could evaluate the log in the query like I have done below and then show a string true/false (or any string). And then you can set thresholds on strings.
Couldn't find a way to include the timestamp in a single value along with the true/false since it is a single value. You could also play around with using a table but it wont be as aesthetic.