Search code examples
kibana

kibana how to visualize cache hits and misses?


enter image description here

Hi, I'm new to kibana visualize.

Background

I want to visualize cache hit ratio of api response.

  • when it's a hit I log ...: “<url…> <some info…> USING CACHE”
  • what it's a miss I log...: “<url …> <some info…> NO HIT”

Query

I made two Y-Axis (picture below) but two graphs are same...

Question

How do I show cache hits and misses in one graph? Do I have to add a new filter? or X-Axies?


Solution

  • I remember wrongly the options about the Y-axis in the aggregation based visualizations. You can build those kind of visualizations both with TSVB and Aggregation Based viz.

    With TSVB you just select the index pattern in the panel options (you can also restrict the documents searched with a Kibana query in the "panel filter")

    enter image description here

    In the data section you can build two filter metrics: in the example "error" and "warn", but in your case you can produce a "hit" metric with query string content: "USING CACHE" and similarly with a "miss" metric with content: "NO HIT"

    enter image description here

    If you instead want to use an aggregation based visualization like in your screenshot, you can split the series like in the following example

    enter image description here