Switch to kingpin flags (#639)
* Switch to kingpin flags * Fix logrus vendoring * Fix flags in main tests * Fix vendoring versions
This commit is contained in:
parent
1467d845fb
commit
dfe07eaae8
84 changed files with 9904 additions and 196 deletions
|
|
@ -17,10 +17,10 @@
|
|||
package collector
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"regexp"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
// Arch-dependent implementation must define:
|
||||
|
|
@ -30,15 +30,14 @@ import (
|
|||
// * filesystemCollector.GetStats
|
||||
|
||||
var (
|
||||
ignoredMountPoints = flag.String(
|
||||
ignoredMountPoints = kingpin.Flag(
|
||||
"collector.filesystem.ignored-mount-points",
|
||||
defIgnoredMountPoints,
|
||||
"Regexp of mount points to ignore for filesystem collector.")
|
||||
|
||||
ignoredFSTypes = flag.String(
|
||||
"Regexp of mount points to ignore for filesystem collector.",
|
||||
).Default(defIgnoredMountPoints).String()
|
||||
ignoredFSTypes = kingpin.Flag(
|
||||
"collector.filesystem.ignored-fs-types",
|
||||
defIgnoredFSTypes,
|
||||
"Regexp of filesystem types to ignore for filesystem collector.")
|
||||
"Regexp of filesystem types to ignore for filesystem collector.",
|
||||
).Default(defIgnoredFSTypes).String()
|
||||
|
||||
filesystemLabelNames = []string{"device", "mountpoint", "fstype"}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue