-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
nacos uses 'http_sd_configs' which is not well adapted to prometheus #12196
Comments
nacos: 2.4.0-BETA Prometheus label names allow to use https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels
|
the metadata is registered by users, which means registered by yourself, please registered without this words when you want to use prometheus sd. if use replace to _ , it might cause the message means dropped. See community suggest and callback. BTW. I think we can add an switch properties to open or close this feature. |
good idea. label maybe convert label name from |
the label is not added by nacos sdk, it added by applications. same with |
Describe the bug
Prometheus uses the http_sd_configs method, and the labels field in its protocol does not support the symbols . and -
#Nacos
#http://127.0.0.1:8848/nacos/prometheus http return
[{"targets":["192.168.31.20:9084"],"labels":{"preserved.register.source":"SPRING_CLOUD"}}]
#prometheus.yml
scrape_configs:
http_sd_configs:
#prometheus run log
ts=2024-06-09T18:29:25.243Z caller=refresh.go:80 level=error component="discovery manager scrape" discovery=http config=nacos-public msg="Unable to refresh target groups" err=""preserved.register.source" is not a valid label name"
The text was updated successfully, but these errors were encountered: