MetricBeat not computing rate counters while using 'rate_counters: true' , and 'use_types: true'-new

Hi,

In my setup, wanted to ingest data from Prometheus into Elasticsearch using MetricBeat.

Below are the versions:

  1. Prometheus: 2.7.1
  2. MetricBeat: 7.7
  3. Elasticsearch/Kibana: 7.7.1

Prometheus is receiving cumulative counters from the client pods.(Entire setup is in a K8S cluster)

We wanted MetricBeat to calculate the difference between the counter values between any two scraping intervals, and send this computed rate values into elasticsearch.

With the below configuration of MetricBeat, it still appears to be sending cumulative counter values instead of rate values. Within the configuration, have already set 'use_types: true', and 'rate_counters: true'

Could you please help in reviewing the configuration and let me know if any additional configuration needs to be enabled on MetricBeat?

cat prometheus.yml

  • module: prometheus
    period: 10s
    metricsets: ["collector"]
    hosts: ["10.69.63.102:31999"]
    metrics_path: '/federate'
    query:
    'match': '{job=~".+", job!="kubernetes-nodes"}'

    use_types: true
    rate_counters: true

Hi!

I think that your problem is that you are trying to collect metrics from the federate API. Metrics collected from this API are in raw format which means that don't carry their type(counter, gauge etc) along and hence rates are not possible to be calculated.

In this, you should configure Metricbeat to collect from the prometheus exporters directly.

C.

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