From ac05e0bdce56896858044db755284a7b5c8f0eae Mon Sep 17 00:00:00 2001 From: Joe Adams Date: Wed, 29 Mar 2023 20:15:41 -0400 Subject: [PATCH] Adjust log level for collector startup Since we support both multi-target and typical direct scrapes, either of these can fail and it is no longer an error. Signed-off-by: Joe Adams --- cmd/postgres_exporter/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/postgres_exporter/main.go b/cmd/postgres_exporter/main.go index cad77b96a..efa96738b 100644 --- a/cmd/postgres_exporter/main.go +++ b/cmd/postgres_exporter/main.go @@ -83,7 +83,7 @@ func main() { if err := c.ReloadConfig(*configFile, logger); err != nil { // This is not fatal, but it means that auth must be provided for every dsn. - level.Error(logger).Log("msg", "Error loading config", "err", err) + level.Warn(logger).Log("msg", "Error loading config", "err", err) } dsns, err := getDataSources() @@ -127,7 +127,7 @@ func main() { []string{}, ) if err != nil { - level.Error(logger).Log("msg", "Failed to create PostgresCollector", "err", err.Error()) + level.Warn(logger).Log("msg", "Failed to create PostgresCollector", "err", err.Error()) } else { prometheus.MustRegister(pe) }