From 82972a8f2aede6c8acf6d3fc3f9e2a48a078645b Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@gmail.com>
Date: Sun, 6 Dec 2020 23:26:34 +0200
Subject: [PATCH] lib/promscrape: mention in scrape error message that scrape
 errors can be disabled by `-promscrape.suppressScrapeErrors` command-line
 flag

---
 lib/promscrape/scrapework.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/promscrape/scrapework.go b/lib/promscrape/scrapework.go
index 864b2cbe06..58392cd93d 100644
--- a/lib/promscrape/scrapework.go
+++ b/lib/promscrape/scrapework.go
@@ -221,7 +221,9 @@ func (sw *scrapeWork) run(stopCh <-chan struct{}) {
 
 func (sw *scrapeWork) logError(s string) {
 	if !*suppressScrapeErrors {
-		logger.ErrorfSkipframes(1, "error when scraping %q from job %q with labels %s: %s", sw.Config.ScrapeURL, sw.Config.Job(), sw.Config.LabelsString(), s)
+		logger.ErrorfSkipframes(1, "error when scraping %q from job %q with labels %s: %s; "+
+			"scrape errors can be disabled by -promscrape.suppressScrapeErrors command-line flag",
+			sw.Config.ScrapeURL, sw.Config.Job(), sw.Config.LabelsString(), s)
 	}
 }