mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-23 23:45:28 +00:00
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:
parent
5f57b78442
commit
ac05e0bdce
@ -83,7 +83,7 @@ func main() {
|
|||||||
|
|
||||||
if err := c.ReloadConfig(*configFile, logger); err != nil {
|
if err := c.ReloadConfig(*configFile, logger); err != nil {
|
||||||
// This is not fatal, but it means that auth must be provided for every dsn.
|
// 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()
|
dsns, err := getDataSources()
|
||||||
@ -127,7 +127,7 @@ func main() {
|
|||||||
[]string{},
|
[]string{},
|
||||||
)
|
)
|
||||||
if err != nil {
|
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 {
|
} else {
|
||||||
prometheus.MustRegister(pe)
|
prometheus.MustRegister(pe)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user