Fail to start if any rados connection fails on startup

Not instantiating an exporter and logging instead of failing to start
when we can't connect to one of the configured clusters is not the
behaviour we want; a user may think that ceph_exporter is monitoring all
of the requested clusters (since it's up and responds to metrics
requests) when in fact data is missing.
This commit is contained in:
Joshua Baergen 2023-11-23 09:46:50 -07:00
parent e858f2efc1
commit a257136ac9
1 changed files with 1 additions and 2 deletions

View File

@ -127,8 +127,7 @@ func main() {
logger)
if err != nil {
logger.WithError(err).WithField("cluster", cluster.ClusterLabel).Error("unable to create rados connection for cluster")
continue
logger.WithError(err).WithField("cluster", cluster.ClusterLabel).Fatal("unable to create rados connection for cluster")
}
prometheus.MustRegister(ceph.NewExporter(