lib/promscrape: add a link to troubleshooting docs to error message when duplicate scrape target with identical labels is skipped

This commit is contained in:
Aliaksandr Valialkin 2020-09-15 14:16:05 +03:00
parent 5f04b00b2d
commit 0c1c1b79ba

View file

@ -266,7 +266,9 @@ func (sg *scraperGroup) update(sws []ScrapeWork) {
sw := &sws[i] sw := &sws[i]
key := sw.key() key := sw.key()
if swsMap[key] { if swsMap[key] {
logger.Errorf("skipping duplicate scrape target with identical labels; endpoint=%s, labels=%s; make sure service discovery and relabeling is set up properly", logger.Errorf("skipping duplicate scrape target with identical labels; endpoint=%s, labels=%s; "+
"make sure service discovery and relabeling is set up properly; "+
"see also https://victoriametrics.github.io/vmagent.html#troubleshooting",
sw.ScrapeURL, sw.LabelsString()) sw.ScrapeURL, sw.LabelsString())
continue continue
} }