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

[etcd] /stats/leader from a follower returns a 403 #1707

Closed
yannmh opened this issue Jun 17, 2015 · 0 comments
Closed

[etcd] /stats/leader from a follower returns a 403 #1707

yannmh opened this issue Jun 17, 2015 · 0 comments
Labels
Milestone

Comments

@yannmh
Copy link
Member

yannmh commented Jun 17, 2015

The /stats/leader endpoint is only available on the leader etcd host.
On the followers, it returns a 403: it is illegitimately logged as an exception in the agent and triggers a CRITICAL service check.

#0[ERROR]: 'Http status code 403 on url http://localhost:4002/v2/stats/leader

Full stacktrace:

2015-06-17 16:41:46 UTC | ERROR | dd.collector | checks.etcd(__init__.py:678) | Check 'etcd' instance #0 failed
Traceback (most recent call last):
  File "/opt/datadog-agent/agent/checks/__init__.py", line 661, in run
    self.check(copy.deepcopy(instance))
  File "/opt/datadog-agent/agent/checks.d/etcd.py", line 114, in check
    leader_response = self._get_leader_metrics(url, timeout)
  File "/opt/datadog-agent/agent/checks.d/etcd.py", line 143, in _get_leader_metrics
    return self._get_json(url + "/v2/stats/leader", timeout)
  File "/opt/datadog-agent/agent/checks.d/etcd.py", line 159, in _get_json
    raise Exception("Http status code {0} on url {1}".format(r.status_code, url))
Exception: Http status code 403 on url http://localhost:4002/v2/stats/leader
@yannmh yannmh added the bugfix label Jun 17, 2015
@yannmh yannmh added this to the 5.5.0 milestone Jun 17, 2015
yannmh added a commit that referenced this issue Jun 17, 2015
The '/stats/leader' endpoint is only available on the leader etcd host.
On the followers, it returns a 403: it is illegitimately logged as an
exception in the agent and triggers a CRITICAL service check.

Fix #1707
yannmh added a commit that referenced this issue Jun 17, 2015
The '/stats/leader' endpoint is only available on the leader etcd host.
On the followers, it returns a 403: it is illegitimately logged as an
exception in the agent and triggers a CRITICAL service check.

Fix #1707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant