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 <github@joeadams.io>
This commit is contained in:
Joe Adams 2023-03-29 20:15:41 -04:00
parent 5f57b78442
commit ac05e0bdce
No known key found for this signature in database
GPG Key ID: 57821BE38D950376

View File

@ -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)
}