Skip to content

Commit 66ac77f

Browse files
committed
PMM-13477 Support MongoDB 8.0
1 parent dac67a8 commit 66ac77f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

exporter/diagnostic_data_collector.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ func (d *diagnosticDataCollector) collect(ch chan<- prometheus.Metric) {
108108
err = errors.Wrapf(errUnexpectedDataType, "%T for data field", m["data"])
109109
logger.Errorf("cannot decode getDiagnosticData: %s", err)
110110
}
111+
if c, ok := m["common"].(bson.M); ok {
112+
m = c
113+
}
111114

112115
logger.Debug("getDiagnosticData result")
113116
debugResult(logger, m)

exporter/metrics.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package exporter
1717

1818
import (
19+
"fmt"
1920
"regexp"
2021
"strings"
2122
"time"
@@ -186,6 +187,15 @@ func makeRawMetric(prefix, name string, value interface{}, labels map[string]str
186187
rm.lv = append(rm.lv, name)
187188
}
188189

190+
if name == "start" || name == "end" {
191+
fmt.Println("fqName: ", fqName)
192+
fmt.Println("help: ", help)
193+
fmt.Println("val: ", *f)
194+
fmt.Println("vt: ", metricType)
195+
fmt.Println("ln: ", rm.ln)
196+
fmt.Println("lv: ", rm.lv)
197+
}
198+
189199
return rm, nil
190200
}
191201

0 commit comments

Comments
 (0)