Small tsvb in dashboard - same as in synthetics

how to create small graphs in dashboards, visually similar with those in "synthetics"?
How to create nice and clean indicator of the last value in an index? The purpose is to visualize in green if the service is up and running or red if is stopped. Considered should be also state if there are no data within time range, so the color changes to red (eventually yellow).

With metrics from Lens. Not legacy metrics :blush:

1 Like

Ok, so the lens metrics does some job, however, it isn't perfect. Just for clarification, I'm using Kibana 8.12.
Some experiences:

  1. If I want to signalize status with color (red/green), I have to use number field (no text, or bool). So I made a field with 0/1 values if the thing is running or not. True/false, up/down, or whatever else is simply out of the game.
  2. I have monitor checking services every minute, in some cases every 2 minutes. The Lens is not best at showing it properly, as in 1 minute period is the field empty. 2 minute seems to be working, no matter what screen res I use. May be worth opening the bug...
  3. I could play with some constructs in formula panel, which were useless for me at the end, but someone can get the inspiration from it, check this:

ifelse(last_value(statusnox, kql='hostname.keyword : "hostname1" and status : true and name.keyword : "service1" ') + ifelse(count(statusnox, kql='hostname.keyword : "hostname1" and status : true and name.keyword : "service1" ') > 0, 1, 0) > 1, 1, 0)

The screenshot where the checks are visible and where are not with the same Lens: