Closed jspaleta closed 5 years ago
Something like this should work at the linux/osX cmdline
\$
is used to prevent bash from trying to replace the variables will creating the command.
sensuctl handler create influx-db \
--type pipe \
--env-vars "INFLUX_USER='user', INFLUX_PASS='pass'"
--command "sensu-influxdb-handler \
--addr 'http://123.4.5.6:8086' \
--db-name 'myDB' \
--username \${INFLUX_USER} \
--password \${INFLUX_PASS}"
Actual no.. this is all wrong. What we need is for influxdb handler to optionally parse ENVVARS instead of arguments.
If it inputted as an argument on the cmdline even via envvar substitution it leaks into the process table.
I'll try to do a PR for this teaching the handler to check for special envvar values.
cmdline arguments are viewable in systemwide process table.
database creds should be held in envvars and references as envvars on the commandline to avoid leaking into the process table.