Skip to content

Commit

Permalink
Merge pull request #445 from bydeath/fix-index_stats-metrics-400_status
Browse files Browse the repository at this point in the history
fix collecting index stats 400 error
  • Loading branch information
sysadmind authored Aug 2, 2021
2 parents 008e29e + 8615b89 commit 845aff6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collector/indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,9 @@ func (i *Indices) fetchAndDecodeIndexStats() (indexStatsResponse, error) {
u := *i.url
u.Path = path.Join(u.Path, "/_all/_stats")
if i.shards {
u.RawQuery = "level=shards"
u.RawQuery = "ignore_unavailable=true&level=shards"
} else {
u.RawQuery = "ignore_unavailable=true"
}

res, err := i.client.Get(u.String())
Expand Down

0 comments on commit 845aff6

Please sign in to comment.