Make collector-specific flags consistent with others.
This puts all collector-specific flags into their own namespace under "collector.<collector-name>", and moves from camel case to dashes, which is the standard in Prometheus land now.
This commit is contained in:
parent
9775276b29
commit
efcce45c90
5 changed files with 10 additions and 9 deletions
|
|
@ -22,7 +22,7 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
ignoredDevices = flag.String("diskstatsIgnoredDevices", "^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$", "Regexp of devices to ignore for diskstats.")
|
||||
ignoredDevices = flag.String("collector.diskstats.ignored-devices", "^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$", "Regexp of devices to ignore for diskstats.")
|
||||
)
|
||||
|
||||
type diskstatsCollector struct {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
ignoredMountPoints = flag.String("filesystemIgnoredMountPoints", "^/(sys|proc|dev)($|/)", "Regexp of mount points to ignore for filesystem collector.")
|
||||
ignoredMountPoints = flag.String("collector.filesystem.ignored-mount-points", "^/(sys|proc|dev)($|/)", "Regexp of mount points to ignore for filesystem collector.")
|
||||
)
|
||||
|
||||
type filesystemCollector struct {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
ntpServer = flag.String("ntpServer", "", "NTP server to use for ntp collector.")
|
||||
ntpServer = flag.String("collector.ntp.server", "", "NTP server to use for ntp collector.")
|
||||
)
|
||||
|
||||
type ntpCollector struct {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
textFileDirectory = flag.String("textfile.directory", "", "Directory to read text files with metrics from.")
|
||||
textFileDirectory = flag.String("collector.textfile.directory", "", "Directory to read text files with metrics from.")
|
||||
)
|
||||
|
||||
type textFileCollector struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue