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

collecting index stats metrics failed with 400 status code error #444

Closed
bydeath opened this issue Jun 23, 2021 · 1 comment · Fixed by #445
Closed

collecting index stats metrics failed with 400 status code error #444

bydeath opened this issue Jun 23, 2021 · 1 comment · Fixed by #445

Comments

@bydeath
Copy link
Contributor

bydeath commented Jun 23, 2021

It failed to collect index stats metrics, log of elasticsearch_exporter says

level=warn ts=2021-06-24T03:28:03.553975379Z caller=indices.go:1094 msg="failed to fetch and decode index stats" err="HTTP Request failed with code 400"

It returns an index_closed_exception 400 response below when I access _all/_stats of the elasticsearch cluster.

{"error":{"root_cause":[{"type":"index_closed_exception","reason":"closed","index_uuid":"TYsMR-7CQcu5a87Olryvwg","index":"test"}],"type":"index_closed_exception","reason":"closed","index_uuid":"TYsMR-7CQcu5a87Olryvwg","index":"test"},"status":400}

Response steps:

  1. Enable security of elasticsearch cluster, and http basic auth is required to access the cluster.
  2. PUT test
  3. PUT test/_alias/test_alias
  4. POST test/_close
  5. GET _all/_stats
  6. start elasticsearch_exporter and curl localhost:9114/metrics.
@bydeath
Copy link
Contributor Author

bydeath commented Jun 24, 2021

underlying issue elastic/elasticsearch/issues/74540

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.

1 participant