nacos icon indicating copy to clipboard operation
nacos copied to clipboard

nacos uses 'http_sd_configs' which is not well adapted to prometheus

Open kuman62 opened this issue 8 months ago • 4 comments

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:

  • job_name: 'nacos-public' http_sd_configs:
    • url: http://127.0.0.1:8848/nacos/prometheus

#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"

kuman62 avatar Jun 09 '24 20:06 kuman62