Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-13571: increase min version to enable pbm collector #3346

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion managed/services/agents/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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")
}

Expand Down
4 changes: 2 additions & 2 deletions managed/services/agents/mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down
5 changes: 4 additions & 1 deletion managed/services/victoriametrics/scrape_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion managed/services/victoriametrics/scrape_configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading