File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,16 @@ func (c *configuration) Init() error {
4848 c .SetDefault ("commands.metrics_info_args" , "--info --json" )
4949 c .SetDefault ("commands.metrics_smart_args" , "--xall --json" )
5050
51+ // Bind environment variables with COLLECTOR_ prefix
52+ c .BindEnv ("host.id" , "COLLECTOR_HOST_ID" )
53+ c .BindEnv ("log.level" , "COLLECTOR_LOG_LEVEL" )
54+ c .BindEnv ("log.file" , "COLLECTOR_LOG_FILE" )
55+ c .BindEnv ("api.endpoint" , "COLLECTOR_API_ENDPOINT" )
56+ c .BindEnv ("commands.metrics_smartctl_bin" , "COLLECTOR_COMMANDS_METRICS_SMARTCTL_BIN" )
57+ c .BindEnv ("commands.metrics_scan_args" , "COLLECTOR_COMMANDS_METRICS_SCAN_ARGS" )
58+ c .BindEnv ("commands.metrics_info_args" , "COLLECTOR_COMMANDS_METRICS_INFO_ARGS" )
59+ c .BindEnv ("commands.metrics_smart_args" , "COLLECTOR_COMMANDS_METRICS_SMART_ARGS" )
60+
5161 //c.SetDefault("collect.short.command", "-a -o on -S on")
5262
5363 c .SetDefault ("allow_listed_devices" , []string {})
You can’t perform that action at this time.
0 commit comments