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-13141 enable fcv collector #3142

Merged
merged 16 commits into from
Sep 13, 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: 3 additions & 0 deletions managed/services/agents/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ func getArgs(exporter *models.Agent, tdp *models.DelimiterPair, listenAddress st
if !pmmAgentVersion.Less(v2_42_0) && collectAll { // >= 2.42.0
args = append(args, "--collector.currentopmetrics")
}
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
args = append(args, "--collector.pbm")
}
Expand Down
2 changes: 2 additions & 0 deletions managed/services/agents/mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ func TestMongodbExporterConfig2430(t *testing.T) {
TemplateRightDelim: "}}",
Args: []string{
"--collector.diagnosticdata",
"--collector.fcv",
"--collector.pbm",
"--collector.replicasetstatus",
"--compatible-mode",
Expand Down Expand Up @@ -472,6 +473,7 @@ func TestMongodbExporterConfig2430(t *testing.T) {
"--collector.currentopmetrics",
"--collector.dbstats",
"--collector.diagnosticdata",
"--collector.fcv",
"--collector.indexstats",
"--collector.pbm",
"--collector.replicasetstatus",
Expand Down
10 changes: 8 additions & 2 deletions managed/services/victoriametrics/scrape_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,13 @@ func scrapeConfigsForMongoDBExporter(params *scrapeConfigParams) ([]*config.Scra
}
return r, nil
}
hr, err := scrapeConfigForStandardExporter("hr", params.metricsResolution.HR, params, []string{
hrOptions := []string{
"diagnosticdata",
"replicasetstatus",
"topmetrics",
})
}
hrOptions = collectors.FilterOutCollectors("", hrOptions, params.agent.DisabledCollectors)
hr, err := scrapeConfigForStandardExporter("hr", params.metricsResolution.HR, params, hrOptions)
if err != nil {
return nil, err
}
Expand All @@ -425,10 +427,14 @@ func scrapeConfigsForMongoDBExporter(params *scrapeConfigParams) ([]*config.Scra
if !params.pmmAgentVersion.Less(version.MustParse("2.42.0-0")) {
defaultCollectors = append(defaultCollectors, "currentopmetrics")
}
if !params.pmmAgentVersion.Less(version.MustParse("2.43.0-0")) {
defaultCollectors = append(defaultCollectors, "fcv")
}
if !params.pmmAgentVersion.Less(version.MustParse("2.43.0-0")) {
defaultCollectors = append(defaultCollectors, "pbm")
}

defaultCollectors = collectors.FilterOutCollectors("", defaultCollectors, params.agent.DisabledCollectors)
lr, err := scrapeConfigForStandardExporter("lr", params.metricsResolution.LR, params, defaultCollectors)
if err != nil {
return nil, err
Expand Down
Loading