-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
bug: apisix report duplicate metrics #11934
Comments
I believe the issue is with metric expiration logic. I was able to reproduce it locally when I set the expiration time to a low value (like Removing metrics expiration configuration resolves duplicates Environment
|
thanks for the reply.. the defalut scrape interval is 15s, so i set the expire to 16s, otherwise the 200m prometheus-metrics shared-dict memory is too small |
i config the expiration like this: plugin_attr:
prometheus:
expire: 16
metrics:
http_status: then i refer to this example config , seem that i make the wrong config of expire, so it's useless? prometheus: # Plugin: prometheus
# metrics: # Create extra labels from nginx variables: https://nginx.org/en/docs/varindex.html
# http_status:
# expire: 0 # The expiration time after which metrics are removed. unit: second.
# # 0 means the metrics will not expire |
Current Behavior
there are several k8s clusters running with apisix, but just one cluster (prod cluster) with the problem that apisix report lots of duplicate metrics.
for example:
so we will see lots of error logs from prometheus:
this metrics is too large, we run 6 pod instance of apisix, i just curl one apisix metrics url, i got about 100mb results.
Expected Behavior
No response
Error Logs
all error logs is about the shdict:
We accept the issue of insufficient shared dict memory, just hope to know why apisix report duplicate metrics.
Steps to Reproduce
no ideas
apisix config:
Environment
apisix version
):3.7.0 (helm version: 2.5.0)
uname -a
):Linux cpu-001 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
openresty -V
ornginx -V
):openresty/1.21.4.2
The text was updated successfully, but these errors were encountered: