Skip to content

Commit

Permalink
*: replace --collectors.[name].* with --collector.[name].* flags …
Browse files Browse the repository at this point in the history
…(click PR number for more information) (#1659)
  • Loading branch information
jkroepke authored Oct 2, 2024
1 parent 2155d34 commit 0a78909
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/collector/dfsr/dfsr.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func NewWithFlags(app *kingpin.Application) *Collector {

var collectorsEnabled string

app.Flag("collectors.dfsr.sources-enabled", "Comma-separated list of DFSR Perflib sources to use.").
app.Flag("collector.dfsr.sources-enabled", "Comma-separated list of DFSR Perflib sources to use.").
Default(strings.Join(ConfigDefaults.CollectorsEnabled, ",")).StringVar(&collectorsEnabled)

app.Action(func(*kingpin.ParseContext) error {
Expand Down
4 changes: 2 additions & 2 deletions pkg/collector/exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ func NewWithFlags(app *kingpin.Application) *Collector {
var collectorsEnabled string

app.Flag(
"collectors.exchange.list",
"collector.exchange.list",
"List the collectors along with their perflib object name/ids",
).BoolVar(&listAllCollectors)

app.Flag(
"collectors.exchange.enabled",
"collector.exchange.enabled",
"Comma-separated list of collectors to use. Defaults to all, if not specified.",
).Default(strings.Join(ConfigDefaults.CollectorsEnabled, ",")).StringVar(&collectorsEnabled)

Expand Down
2 changes: 1 addition & 1 deletion pkg/collector/filetime/filetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func NewWithFlags(app *kingpin.Application) *Collector {
var filePatterns string

app.Flag(
"collectors.filetime.file-patterns",
"collector.filetime.file-patterns",
"Comma-separated list of file patterns. Each pattern is a glob pattern that can contain `*`, `?`, and `**` (recursive). See https://github.com/bmatcuk/doublestar#patterns",
).Default(strings.Join(ConfigDefaults.filePatterns, ",")).StringVar(&filePatterns)

Expand Down
2 changes: 1 addition & 1 deletion pkg/collector/mscluster/mscluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func NewWithFlags(app *kingpin.Application) *Collector {
var collectorsEnabled string

app.Flag(
"collectors.mscluster.enabled",
"collector.mscluster.enabled",
"Comma-separated list of collectors to use.",
).Default(strings.Join(ConfigDefaults.CollectorsEnabled, ",")).StringVar(&collectorsEnabled)

Expand Down
4 changes: 2 additions & 2 deletions pkg/collector/mssql/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,12 @@ func NewWithFlags(app *kingpin.Application) *Collector {
var collectorsEnabled string

app.Flag(
"collectors.mssql.class-print",
"collector.mssql.class-print",
"If true, print available mssql WMI classes and exit. Only displays if the mssql collector is enabled.",
).BoolVar(&listAllCollectors)

app.Flag(
"collectors.mssql.classes-enabled",
"collector.mssql.classes-enabled",
"Comma-separated list of mssql WMI classes to use.",
).Default(strings.Join(c.config.CollectorsEnabled, ",")).StringVar(&collectorsEnabled)

Expand Down

0 comments on commit 0a78909

Please sign in to comment.