File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ import (
2525 "github.com/prometheus/client_golang/prometheus"
2626 "github.com/sirupsen/logrus"
2727 "go.mongodb.org/mongo-driver/mongo"
28+
29+ "github.com/percona/mongodb_exporter/internal/util"
2830)
2931
3032// pbm collector collects metrics from PBM (Percona Backup for MongoDb).
@@ -125,7 +127,7 @@ func (p *pbmCollector) collect(ch chan<- prometheus.Metric) {
125127}
126128
127129func (p * pbmCollector ) pbmAgentMetrics (ctx context.Context , pbmClient * sdk.Client , l * logrus.Entry ) []prometheus.Metric {
128- currentNode , err := sdk . GetNodeInfo (ctx , pbmClient )
130+ currentNode , err := util . MyRole (ctx , p . base . client )
129131 if err != nil {
130132 l .Errorf ("failed to get current node info: %s" , err .Error ())
131133 return nil
You can’t perform that action at this time.
0 commit comments