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

Use expand_wildcards to limit bad API responses #595

Open
VimCommando opened this issue Jun 21, 2022 · 0 comments
Open

Use expand_wildcards to limit bad API responses #595

VimCommando opened this issue Jun 21, 2022 · 0 comments

Comments

@VimCommando
Copy link
Contributor

Certain API calls will fail if there are closed indices in the cluster, such as _nodes/stats. When there is a closed index it will respond with:

Bad Request. Rejected
{
  "error" : {
    "root_cause" : [
      {
        "type" : "index_closed_exception",
        "reason" : "closed",
        "index_uuid" : "LEF6dp1xTC2dkNCEMRtUUQ",
        "index" : "syslog"
      }
    ],
    "type" : "index_closed_exception",
    "reason" : "closed",
    "index_uuid" : "LEF6dp1xTC2dkNCEMRtUUQ",
    "index" : "syslog"
  },
  "status" : 400
}

The multi-target syntax allows adding ?expand_wildcards=open as far back as 6.8:
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/multi-index.html

With additional ?expand_wildcards=open,hidden options in 7.x:
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/multi-index.html

If we add this to the API calls we can hopefully prevent parsing failures when trying to run the diagnostic through the analyzer.

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

No branches or pull requests

2 participants