-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prometheus remote_write rate calculations is showing as zero #38458
Comments
I am currently troubleshooting with metricbeat + prometheus integration with remote_write. tl;dr - Short SummaryWe dont correctly initialise the internal counter cache where we keep the counter values between fetches in order to evaluate rates. Long descriptionThe code for rate calculation of counter types is based on this rateCounterFloat64 fucntion, which has a receiver of remoteWriteTypedGenerator This receiver actually initialises a newCounterCache here based on the config.Period parameter. // use a counter cache with a timeout of 5x the period, as a safe value
// to make sure that all counters are available between fetches In Prometheus+collector : We initialise the Period with default value 10s. And seems that is the reason that we dont have an issue with collector In remote_write we dont provide such Period value in elastic-agent config Testing ResultsSo with metricbeat I am using the following config: - module: prometheus
metricsets: ["remote_write"]
host: "0.0.0.0"
port: "9201"
use_types: true
rate_counters: true
period: 10m (see that I provide a period) For the last 30min or so the rates are calculated successfully |
For elastic-agent installations, seems that there is a combination of issues:
inputs:
- name: prometheus
type: prometheus/metrics
use_output: default
meta:
package:
name: prometheus
version: 1.15.0
data_stream:
namespace: default
streams:
- data_stream:
dataset: prometheus.remote_write
type: metrics
metricsets:
- remote_write
host: '0.0.0.0'
port: 9201
rate_counters: true
use_types: true
period: 1m Next Steps:
|
Investigate why Prometheus integration with remote_write configuration is showing
prometheus.*.rate
fields as 0 value. User reported that is seeing the prometheus.*.counter fields, but the rate field is not showing any value.Information:
The text was updated successfully, but these errors were encountered: