Graphing the share of a value over total

Hi folks,

I'm quite new to kibana, and there's something really simple I'd like to do, and can't find the way.

I want to measure the availability of an API over time, so it's simply the percent of successful queries (http 2xx) over the total, along time. Basically something like this

How to do it with kibana ?

If you don't already have the api access log data, I'd highly recommend using Heartbeat which basically pings a hostname/api and then displays the data in the Uptime app in Kibana.
If you already have the data, you can try this:

  1. Create an Area chart visualization on the index that you have.
  2. Set Count as a metric on the Y axis
  3. Set a Date histogram on your time field in the X Axis.
  4. Select Split series on the X Axis, with a Filters aggregation.
  5. In the field, select the field that has the response (in the sample data it's a string field, so i'm going to treat it like that here too).
  6. First filter should be response.keyword: 2* (here response.keyword is the field with the reponse)
  7. Second filter should be NOT response.keyword: 2*
  8. In the metrics & axes tab of the visualization options. set the Y-axis to Mode: Percentage.

You can change it from chart type: area to line if you want it look exactly like your example.

Thanks for your answer.
I find this convoluted... but ok, I managed to do that. Problem now is with the scale of y axis.
First, it's not dynamically adjusted to what happens, and with an availability in the 99.5% the labels are just useless :frowning:

I tried a "metric" display instead (same splitting and all), and ...erm... what the hell does that even mean ?

(kibana v6.8.2)

You can change the bounds of the chart to show values up to 110%, makes it way easier to read.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.