hoonmin / influxdb-collectd-proxy

A very simple proxy between collectd and influxdb.
MIT License
72 stars 26 forks source link

Support ENV variables for user, password and db #24

Closed yanfali closed 9 years ago

yanfali commented 9 years ago

Adding the following environmental variables to allow configuration of username, password and database to make it less trivial to get this information from top:

While these values are still available from /proc/<processid>/environ on a linux based system you have to have elevated privileges to look at them. With the current variables you can simply look at top to see the username, password and database.

yanfali commented 9 years ago

BTW, I deliberately exposed these values in the help text so it's easy to verify that the values have been passed in from os.Env. e.g.

INFLUXDB_PROXY_DATABASE=influx1 INFLUXDB_PROXY_USERNAME='banana' INFLUXDB_PROXY_PASSWORD='banacheck' influxdb-collectd-proxy --help
hoonmin commented 9 years ago

Sure! Merged your PR. Thanks!

yanfali commented 9 years ago

Thanks @hoonmin