Skip to content

Commit

Permalink
Collect stats for open and hidden indices (but not closed ones)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Jul 6, 2020
1 parent c88e26b commit 81eab48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func ingestAndEnrichDoc(host string) error {
}

func countIndices(elasticsearchHostPort string) (int, error) {
return countCatItems(elasticsearchHostPort, "indices", "&expand_wildcards=all")
return countCatItems(elasticsearchHostPort, "indices", "&expand_wildcards=open,hidden")

}

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/elasticsearch/index/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func init() {

const (
statsMetrics = "docs,fielddata,indexing,merge,search,segments,store,refresh,query_cache,request_cache"
statsPath = "/_stats/" + statsMetrics + "?filter_path=indices&expand_wildcards=all"
statsPath = "/_stats/" + statsMetrics + "?filter_path=indices&expand_wildcards=open,hidden"
)

// MetricSet type defines all fields of the MetricSet
Expand Down

0 comments on commit 81eab48

Please sign in to comment.