Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Consul input plugin does not utilize token #3375

Closed
smolse opened this issue Oct 23, 2017 · 0 comments · Fixed by #3376
Closed

[BUG] Consul input plugin does not utilize token #3375

smolse opened this issue Oct 23, 2017 · 0 comments · Fixed by #3376
Milestone

Comments

@smolse
Copy link
Contributor

smolse commented Oct 23, 2017

Bug report

Before Consul version 0.7.2 there was no need to include ACL token in request params or headers to get health checks data from Consul API. In version 0.7.2 Consul introduced complete ACL coverage which has been taken into use by default in Consul 0.8.0. Now in order to get health checks data from API a user needs to have a token with node:read and service:read policies . Consul input plugin in telegraf already accepts ACL token as a configuration option, but neither uses it to set in API client config nor passes to the State method.

Relevant telegraf.conf:

[[inputs.consul]]
  address = "localhost:8500"
  token = "<replace me>"

System info:

Telegraf version: any that has consul input plugin
Consul version: >= 0.8.0

Steps to reproduce:

  1. Assume consul is running locally with default config and API is available at localhost:8500
  2. Create ACL token in Consul and add it to the telegraf config for consul plugin
  3. Run telegraf --config telegraf.conf --test

Expected behavior:

Consul plugin was able to retrieve metrics, e.g. the output is:

$ telegraf --config telegraf.conf --test
* Plugin: inputs.consul, Collection 1
> consul_health_checks,node=consul,check_id=serfHealth,host=vbox check_name="Serf Health Status",service_id="",status="passing",passing=1i,critical=0i,warning=0i 1508784579000000000

Actual behavior:

Output is:

$ telegraf --config telegraf.conf --test
* Plugin: inputs.consul, Collection 1

I.e. consul plugin in telegraf is not able to get health states from Consul API.

smolse pushed a commit to smolse/telegraf that referenced this issue Oct 23, 2017
smolse pushed a commit to smolse/telegraf that referenced this issue Oct 23, 2017
@danielnelson danielnelson added this to the 1.4.3 milestone Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants