diff --git a/managed/services/agents/mongodb.go b/managed/services/agents/mongodb.go index 919c89dc15..1737e5954b 100644 --- a/managed/services/agents/mongodb.go +++ b/managed/services/agents/mongodb.go @@ -38,6 +38,7 @@ var ( v2_41_1 = version.MustParse("2.41.1-0") v2_42_0 = version.MustParse("2.42.0-0") v2_43_0 = version.MustParse("2.43.0-0") + v2_43_2 = version.MustParse("2.43.2-0") ) // mongodbExporterConfig returns desired configuration of mongodb_exporter process. @@ -113,7 +114,7 @@ func getArgs(exporter *models.Agent, tdp *models.DelimiterPair, listenAddress st if !pmmAgentVersion.Less(v2_43_0) { // >= 2.43.0, enable by default args = append(args, "--collector.fcv") } - if !pmmAgentVersion.Less(v2_43_0) { // >= 2.43.0, enable pbm collector by default + if !pmmAgentVersion.Less(v2_43_2) { // >= 2.43.2, enable pbm collector by default args = append(args, "--collector.pbm") } diff --git a/managed/services/agents/mongodb_test.go b/managed/services/agents/mongodb_test.go index b33ffd2d13..f4f4d0a2fe 100644 --- a/managed/services/agents/mongodb_test.go +++ b/managed/services/agents/mongodb_test.go @@ -415,8 +415,8 @@ func TestMongodbExporterConfig2411(t *testing.T) { }) } -func TestMongodbExporterConfig2430(t *testing.T) { - pmmAgentVersion := version.MustParse("2.43.0") +func TestMongodbExporterConfig2432(t *testing.T) { + pmmAgentVersion := version.MustParse("2.43.2") node := &models.Node{ Address: "1.2.3.4", } diff --git a/managed/services/victoriametrics/scrape_configs.go b/managed/services/victoriametrics/scrape_configs.go index 210fa142b4..94b22ff8c6 100644 --- a/managed/services/victoriametrics/scrape_configs.go +++ b/managed/services/victoriametrics/scrape_configs.go @@ -418,7 +418,10 @@ func scrapeConfigsForMongoDBExporter(params *scrapeConfigParams) ([]*config.Scra var defaultCollectors []string if !params.pmmAgentVersion.Less(version.MustParse("2.43.0-0")) { - defaultCollectors = append(defaultCollectors, "fcv", "pbm") + defaultCollectors = append(defaultCollectors, "fcv") + } + if !params.pmmAgentVersion.Less(version.MustParse("2.43.2-0")) { + defaultCollectors = append(defaultCollectors, "pbm") } if params.agent.MongoDBOptions != nil && params.agent.MongoDBOptions.EnableAllCollectors { diff --git a/managed/services/victoriametrics/scrape_configs_test.go b/managed/services/victoriametrics/scrape_configs_test.go index 7917f51c55..4cfa8ec280 100644 --- a/managed/services/victoriametrics/scrape_configs_test.go +++ b/managed/services/victoriametrics/scrape_configs_test.go @@ -888,7 +888,7 @@ func TestScrapeConfig(t *testing.T) { node: node, service: service, agent: agent, - pmmAgentVersion: version.MustParse("2.43.0"), + pmmAgentVersion: version.MustParse("2.43.2"), metricsResolution: s, }) require.NoError(t, err)