Skip to content

Commit aaa77db

Browse files
authored
Merge branch 'master' into fix_494
2 parents b7d57c0 + a58f944 commit aaa77db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

collector/pkg/config/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ func (c *configuration) Init() error {
4949
c.SetDefault("commands.metrics_smart_args", "--xall --json")
5050
c.SetDefault("commands.metrics_smartctl_wait", 0)
5151

52+
//configure env variable parsing.
53+
c.SetEnvPrefix("COLLECTOR")
54+
c.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_"))
55+
c.AutomaticEnv()
56+
5257
//c.SetDefault("collect.short.command", "-a -o on -S on")
5358

5459
c.SetDefault("allow_listed_devices", []string{})

0 commit comments

Comments
 (0)