deis / monitor

Monitoring for Deis Workflow
https://deis.com
MIT License
22 stars 32 forks source link

ETCD default URL is invalid #141

Closed sstarcher closed 7 years ago

sstarcher commented 7 years ago

The default value for ETCD is not quoted, which results in the following config.

[[inputs.prometheus]]
  urls = [http://localhost:2379/metrics]

https://github.com/deis/monitor/blob/master/telegraf/rootfs/config.toml.tpl#L213

A current solution is to specify ETCD_URLS='\"http://localhost:2379/metrics\"'

One option would be to | quote but that would break ETCD_URLS if multiple URLS were specified.

Current things with similar issues would be.

INFLUXDB_URLS will work as long as only a single URL is specified. The plural causes confusion and issues. APACHE_URLS, NGINX_URLS, PROMETHEUS_URLS will work as long as they are quoted by the user.

jchauncey commented 7 years ago

good catch. It would be better to get that passed in already quoted

jchauncey commented 7 years ago

For instance we do this for Prometheus urls -

export PROMETHEUS_URLS="\"$API_URL/api/v1/proxy/nodes/$NODE_NAME/metrics\", \"$API_URL/metrics\""
sstarcher commented 7 years ago

@jchauncey yep makes sense. In that case only the default value is incorrect, but INFLUXDB_URLS is also inconsistent.

jchauncey commented 7 years ago

I think we drop the quote call and force everyone to quote the urls before we splat them out in telegraf.

sstarcher commented 7 years ago

That would work and be consistent. We could also not force the quotes and split on comma, but that would require slightly more work.

jchauncey commented 7 years ago

fixed in #142