Open henrikno opened 4 days ago
Thanks @henrikno for creating this. Let me pull @lalit-satapathy in as his team is the one owning the prometheus integration.
Thanks @henrikno for creating this. Let me pull @lalit-satapathy in as his team is the one owning the prometheus integration.
@shmsr can you take a look?
I'll take a look.
This prometheus histogram metric:
Gets turned into this in ES:
We are using use_types and rate, 1. because it's the default in the elastic-agent integration, and 2. to be able to query them in Kibana. https://www.elastic.co/docs/current/integrations/prometheus#histograms-and-types-1 However, the values don't look like the example, and what we expect. The
_count
and_sum
is missing. I was hoping to query the rate of the count/sum.Sidenote, if the buckets are diffed, I expected it to be named .rate. I was confused why the values did not match what the prometheus endpoint waas reporting at all. This is what it does for counters. Also for counters it keeps the original, but I can see that that would increase the storage.
Another thing that looks funny is the empty values
{"values":[],"counts":[]}
. Looks like this is happening because we use TSDS, which is also the default in the prometheus integration.I tried to reproduce it with just metricbeat 8.15.3.
Put the example at the top in a file called
metrics
, then runpython3 -m http.server 9000
Set this in metricbeat.yml
With use_types: true, rate_counters: false, I get a bunch of zeroes:
With rate_counters: false I expected to get the exact same values that prometheus reports. Also missing _sum and _count. If I disable use_types, I do see the values, but there's one document per bucket which is extremely difficult to query.