Skip to content

Commit

Permalink
Adjust log level for collector startup
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sysadmind committed Mar 30, 2023
1 parent 5f57b78 commit ac05e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/postgres_exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit ac05e0b

Please sign in to comment.