mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
*: replace --collectors.[name].* with --collector.[name].* flags (click PR number for more information) (#1659)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user