cat_indices.go 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. // Copyright 2012-present Oliver Eilhard. All rights reserved.
  2. // Use of this source code is governed by a MIT-license.
  3. // See http://olivere.mit-license.org/license.txt for details.
  4. package elastic
  5. import (
  6. "context"
  7. "fmt"
  8. "net/http"
  9. "net/url"
  10. "strings"
  11. "gopkg.in/olivere/elastic.v5/uritemplates"
  12. )
  13. // CatIndicesService returns the list of indices plus some additional
  14. // information about them.
  15. //
  16. // See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/cat-indices.html
  17. // for details.
  18. type CatIndicesService struct {
  19. client *Client
  20. pretty *bool // pretty format the returned JSON response
  21. human *bool // return human readable values for statistics
  22. errorTrace *bool // include the stack trace of returned errors
  23. filterPath []string // list of filters used to reduce the response
  24. index string
  25. bytes string // b, k, m, or g
  26. local *bool
  27. masterTimeout string
  28. columns []string
  29. health string // green, yellow, or red
  30. primaryOnly *bool // true for primary shards only
  31. sort []string // list of columns for sort order
  32. headers http.Header
  33. }
  34. // NewCatIndicesService creates a new CatIndicesService.
  35. func NewCatIndicesService(client *Client) *CatIndicesService {
  36. return &CatIndicesService{
  37. client: client,
  38. }
  39. }
  40. // Pretty tells Elasticsearch whether to return a formatted JSON response.
  41. func (s *CatIndicesService) Pretty(pretty bool) *CatIndicesService {
  42. s.pretty = &pretty
  43. return s
  44. }
  45. // Human specifies whether human readable values should be returned in
  46. // the JSON response, e.g. "7.5mb".
  47. func (s *CatIndicesService) Human(human bool) *CatIndicesService {
  48. s.human = &human
  49. return s
  50. }
  51. // ErrorTrace specifies whether to include the stack trace of returned errors.
  52. func (s *CatIndicesService) ErrorTrace(errorTrace bool) *CatIndicesService {
  53. s.errorTrace = &errorTrace
  54. return s
  55. }
  56. // FilterPath specifies a list of filters used to reduce the response.
  57. func (s *CatIndicesService) FilterPath(filterPath ...string) *CatIndicesService {
  58. s.filterPath = filterPath
  59. return s
  60. }
  61. // Header adds a header to the request.
  62. func (s *CatIndicesService) Header(name string, value string) *CatIndicesService {
  63. if s.headers == nil {
  64. s.headers = http.Header{}
  65. }
  66. s.headers.Add(name, value)
  67. return s
  68. }
  69. // Headers specifies the headers of the request.
  70. func (s *CatIndicesService) Headers(headers http.Header) *CatIndicesService {
  71. s.headers = headers
  72. return s
  73. }
  74. // Index is the name of the index to list (by default all indices are returned).
  75. func (s *CatIndicesService) Index(index string) *CatIndicesService {
  76. s.index = index
  77. return s
  78. }
  79. // Bytes represents the unit in which to display byte values.
  80. // Valid values are: "b", "k", "m", or "g".
  81. func (s *CatIndicesService) Bytes(bytes string) *CatIndicesService {
  82. s.bytes = bytes
  83. return s
  84. }
  85. // Local indicates to return local information, i.e. do not retrieve
  86. // the state from master node (default: false).
  87. func (s *CatIndicesService) Local(local bool) *CatIndicesService {
  88. s.local = &local
  89. return s
  90. }
  91. // MasterTimeout is the explicit operation timeout for connection to master node.
  92. func (s *CatIndicesService) MasterTimeout(masterTimeout string) *CatIndicesService {
  93. s.masterTimeout = masterTimeout
  94. return s
  95. }
  96. // Columns to return in the response.
  97. // To get a list of all possible columns to return, run the following command
  98. // in your terminal:
  99. //
  100. // Example:
  101. // curl 'http://localhost:9200/_cat/indices?help'
  102. //
  103. // You can use Columns("*") to return all possible columns. That might take
  104. // a little longer than the default set of columns.
  105. func (s *CatIndicesService) Columns(columns ...string) *CatIndicesService {
  106. s.columns = columns
  107. return s
  108. }
  109. // Health filters indices by their health status.
  110. // Valid values are: "green", "yellow", or "red".
  111. func (s *CatIndicesService) Health(healthState string) *CatIndicesService {
  112. s.health = healthState
  113. return s
  114. }
  115. // PrimaryOnly when set to true returns stats only for primary shards (default: false).
  116. func (s *CatIndicesService) PrimaryOnly(primaryOnly bool) *CatIndicesService {
  117. s.primaryOnly = &primaryOnly
  118. return s
  119. }
  120. // Sort is a list of fields to sort by.
  121. func (s *CatIndicesService) Sort(fields ...string) *CatIndicesService {
  122. s.sort = fields
  123. return s
  124. }
  125. // buildURL builds the URL for the operation.
  126. func (s *CatIndicesService) buildURL() (string, url.Values, error) {
  127. // Build URL
  128. var (
  129. path string
  130. err error
  131. )
  132. if s.index != "" {
  133. path, err = uritemplates.Expand("/_cat/indices/{index}", map[string]string{
  134. "index": s.index,
  135. })
  136. } else {
  137. path = "/_cat/indices"
  138. }
  139. if err != nil {
  140. return "", url.Values{}, err
  141. }
  142. // Add query string parameters
  143. params := url.Values{
  144. "format": []string{"json"}, // always returns as JSON
  145. }
  146. if v := s.pretty; v != nil {
  147. params.Set("pretty", fmt.Sprint(*v))
  148. }
  149. if v := s.human; v != nil {
  150. params.Set("human", fmt.Sprint(*v))
  151. }
  152. if v := s.errorTrace; v != nil {
  153. params.Set("error_trace", fmt.Sprint(*v))
  154. }
  155. if len(s.filterPath) > 0 {
  156. params.Set("filter_path", strings.Join(s.filterPath, ","))
  157. }
  158. if s.bytes != "" {
  159. params.Set("bytes", s.bytes)
  160. }
  161. if v := s.local; v != nil {
  162. params.Set("local", fmt.Sprint(*v))
  163. }
  164. if s.masterTimeout != "" {
  165. params.Set("master_timeout", s.masterTimeout)
  166. }
  167. if len(s.columns) > 0 {
  168. // loop through all columns and apply alias if needed
  169. for i, column := range s.columns {
  170. if fullValueRaw, isAliased := catIndicesResponseRowAliasesMap[column]; isAliased {
  171. // alias can be translated to multiple fields,
  172. // so if translated value contains a comma, than replace the first value
  173. // and append the others
  174. if strings.Contains(fullValueRaw, ",") {
  175. fullValues := strings.Split(fullValueRaw, ",")
  176. s.columns[i] = fullValues[0]
  177. s.columns = append(s.columns, fullValues[1:]...)
  178. } else {
  179. s.columns[i] = fullValueRaw
  180. }
  181. }
  182. }
  183. params.Set("h", strings.Join(s.columns, ","))
  184. }
  185. if s.health != "" {
  186. params.Set("health", s.health)
  187. }
  188. if v := s.primaryOnly; v != nil {
  189. params.Set("pri", fmt.Sprint(*v))
  190. }
  191. if len(s.sort) > 0 {
  192. params.Set("s", strings.Join(s.sort, ","))
  193. }
  194. return path, params, nil
  195. }
  196. // Do executes the operation.
  197. func (s *CatIndicesService) Do(ctx context.Context) (CatIndicesResponse, error) {
  198. // Get URL for request
  199. path, params, err := s.buildURL()
  200. if err != nil {
  201. return nil, err
  202. }
  203. // Get HTTP response
  204. res, err := s.client.PerformRequestWithOptions(ctx, PerformRequestOptions{
  205. Method: "GET",
  206. Path: path,
  207. Params: params,
  208. Headers: s.headers,
  209. })
  210. if err != nil {
  211. return nil, err
  212. }
  213. // Return operation response
  214. var ret CatIndicesResponse
  215. if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
  216. return nil, err
  217. }
  218. return ret, nil
  219. }
  220. // -- Result of a get request.
  221. // CatIndicesResponse is the outcome of CatIndicesService.Do.
  222. type CatIndicesResponse []CatIndicesResponseRow
  223. // CatIndicesResponseRow specifies the data returned for one index
  224. // of a CatIndicesResponse. Notice that not all of these fields might
  225. // be filled; that depends on the number of columns chose in the
  226. // request (see CatIndicesService.Columns).
  227. type CatIndicesResponseRow struct {
  228. Health string `json:"health"` // "green", "yellow", or "red"
  229. Status string `json:"status"` // "open" or "closed"
  230. Index string `json:"index"` // index name
  231. UUID string `json:"uuid"` // index uuid
  232. Pri int `json:"pri,string"` // number of primary shards
  233. Rep int `json:"rep,string"` // number of replica shards
  234. DocsCount int `json:"docs.count,string"` // number of available documents
  235. DocsDeleted int `json:"docs.deleted,string"` // number of deleted documents
  236. CreationDate int64 `json:"creation.date,string"` // index creation date (millisecond value), e.g. 1527077221644
  237. CreationDateString string `json:"creation.date.string"` // index creation date (as string), e.g. "2018-05-23T12:07:01.644Z"
  238. StoreSize string `json:"store.size"` // store size of primaries & replicas, e.g. "4.6kb"
  239. PriStoreSize string `json:"pri.store.size"` // store size of primaries, e.g. "230b"
  240. CompletionSize string `json:"completion.size"` // size of completion on primaries & replicas
  241. PriCompletionSize string `json:"pri.completion.size"` // size of completion on primaries
  242. FielddataMemorySize string `json:"fielddata.memory_size"` // used fielddata cache on primaries & replicas
  243. PriFielddataMemorySize string `json:"pri.fielddata.memory_size"` // used fielddata cache on primaries
  244. FielddataEvictions int `json:"fielddata.evictions,string"` // fielddata evictions on primaries & replicas
  245. PriFielddataEvictions int `json:"pri.fielddata.evictions,string"` // fielddata evictions on primaries
  246. QueryCacheMemorySize string `json:"query_cache.memory_size"` // used query cache on primaries & replicas
  247. PriQueryCacheMemorySize string `json:"pri.query_cache.memory_size"` // used query cache on primaries
  248. QueryCacheEvictions int `json:"query_cache.evictions,string"` // query cache evictions on primaries & replicas
  249. PriQueryCacheEvictions int `json:"pri.query_cache.evictions,string"` // query cache evictions on primaries
  250. RequestCacheMemorySize string `json:"request_cache.memory_size"` // used request cache on primaries & replicas
  251. PriRequestCacheMemorySize string `json:"pri.request_cache.memory_size"` // used request cache on primaries
  252. RequestCacheEvictions int `json:"request_cache.evictions,string"` // request cache evictions on primaries & replicas
  253. PriRequestCacheEvictions int `json:"pri.request_cache.evictions,string"` // request cache evictions on primaries
  254. RequestCacheHitCount int `json:"request_cache.hit_count,string"` // request cache hit count on primaries & replicas
  255. PriRequestCacheHitCount int `json:"pri.request_cache.hit_count,string"` // request cache hit count on primaries
  256. RequestCacheMissCount int `json:"request_cache.miss_count,string"` // request cache miss count on primaries & replicas
  257. PriRequestCacheMissCount int `json:"pri.request_cache.miss_count,string"` // request cache miss count on primaries
  258. FlushTotal int `json:"flush.total,string"` // number of flushes on primaries & replicas
  259. PriFlushTotal int `json:"pri.flush.total,string"` // number of flushes on primaries
  260. FlushTotalTime string `json:"flush.total_time"` // time spent in flush on primaries & replicas
  261. PriFlushTotalTime string `json:"pri.flush.total_time"` // time spent in flush on primaries
  262. GetCurrent int `json:"get.current,string"` // number of current get ops on primaries & replicas
  263. PriGetCurrent int `json:"pri.get.current,string"` // number of current get ops on primaries
  264. GetTime string `json:"get.time"` // time spent in get on primaries & replicas
  265. PriGetTime string `json:"pri.get.time"` // time spent in get on primaries
  266. GetTotal int `json:"get.total,string"` // number of get ops on primaries & replicas
  267. PriGetTotal int `json:"pri.get.total,string"` // number of get ops on primaries
  268. GetExistsTime string `json:"get.exists_time"` // time spent in successful gets on primaries & replicas
  269. PriGetExistsTime string `json:"pri.get.exists_time"` // time spent in successful gets on primaries
  270. GetExistsTotal int `json:"get.exists_total,string"` // number of successful gets on primaries & replicas
  271. PriGetExistsTotal int `json:"pri.get.exists_total,string"` // number of successful gets on primaries
  272. GetMissingTime string `json:"get.missing_time"` // time spent in failed gets on primaries & replicas
  273. PriGetMissingTime string `json:"pri.get.missing_time"` // time spent in failed gets on primaries
  274. GetMissingTotal int `json:"get.missing_total,string"` // number of failed gets on primaries & replicas
  275. PriGetMissingTotal int `json:"pri.get.missing_total,string"` // number of failed gets on primaries
  276. IndexingDeleteCurrent int `json:"indexing.delete_current,string"` // number of current deletions on primaries & replicas
  277. PriIndexingDeleteCurrent int `json:"pri.indexing.delete_current,string"` // number of current deletions on primaries
  278. IndexingDeleteTime string `json:"indexing.delete_time"` // time spent in deletions on primaries & replicas
  279. PriIndexingDeleteTime string `json:"pri.indexing.delete_time"` // time spent in deletions on primaries
  280. IndexingDeleteTotal int `json:"indexing.delete_total,string"` // number of delete ops on primaries & replicas
  281. PriIndexingDeleteTotal int `json:"pri.indexing.delete_total,string"` // number of delete ops on primaries
  282. IndexingIndexCurrent int `json:"indexing.index_current,string"` // number of current indexing on primaries & replicas
  283. PriIndexingIndexCurrent int `json:"pri.indexing.index_current,string"` // number of current indexing on primaries
  284. IndexingIndexTime string `json:"indexing.index_time"` // time spent in indexing on primaries & replicas
  285. PriIndexingIndexTime string `json:"pri.indexing.index_time"` // time spent in indexing on primaries
  286. IndexingIndexTotal int `json:"indexing.index_total,string"` // number of index ops on primaries & replicas
  287. PriIndexingIndexTotal int `json:"pri.indexing.index_total,string"` // number of index ops on primaries
  288. IndexingIndexFailed int `json:"indexing.index_failed,string"` // number of failed indexing ops on primaries & replicas
  289. PriIndexingIndexFailed int `json:"pri.indexing.index_failed,string"` // number of failed indexing ops on primaries
  290. MergesCurrent int `json:"merges.current,string"` // number of current merges on primaries & replicas
  291. PriMergesCurrent int `json:"pri.merges.current,string"` // number of current merges on primaries
  292. MergesCurrentDocs int `json:"merges.current_docs,string"` // number of current merging docs on primaries & replicas
  293. PriMergesCurrentDocs int `json:"pri.merges.current_docs,string"` // number of current merging docs on primaries
  294. MergesCurrentSize string `json:"merges.current_size"` // size of current merges on primaries & replicas
  295. PriMergesCurrentSize string `json:"pri.merges.current_size"` // size of current merges on primaries
  296. MergesTotal int `json:"merges.total,string"` // number of completed merge ops on primaries & replicas
  297. PriMergesTotal int `json:"pri.merges.total,string"` // number of completed merge ops on primaries
  298. MergesTotalDocs int `json:"merges.total_docs,string"` // docs merged on primaries & replicas
  299. PriMergesTotalDocs int `json:"pri.merges.total_docs,string"` // docs merged on primaries
  300. MergesTotalSize string `json:"merges.total_size"` // size merged on primaries & replicas
  301. PriMergesTotalSize string `json:"pri.merges.total_size"` // size merged on primaries
  302. MergesTotalTime string `json:"merges.total_time"` // time spent in merges on primaries & replicas
  303. PriMergesTotalTime string `json:"pri.merges.total_time"` // time spent in merges on primaries
  304. RefreshTotal int `json:"refresh.total,string"` // total refreshes on primaries & replicas
  305. PriRefreshTotal int `json:"pri.refresh.total,string"` // total refreshes on primaries
  306. RefreshExternalTotal int `json:"refresh.external_total,string"` // total external refreshes on primaries & replicas
  307. PriRefreshExternalTotal int `json:"pri.refresh.external_total,string"` // total external refreshes on primaries
  308. RefreshTime string `json:"refresh.time"` // time spent in refreshes on primaries & replicas
  309. PriRefreshTime string `json:"pri.refresh.time"` // time spent in refreshes on primaries
  310. RefreshExternalTime string `json:"refresh.external_time"` // external time spent in refreshes on primaries & replicas
  311. PriRefreshExternalTime string `json:"pri.refresh.external_time"` // external time spent in refreshes on primaries
  312. RefreshListeners int `json:"refresh.listeners,string"` // number of pending refresh listeners on primaries & replicas
  313. PriRefreshListeners int `json:"pri.refresh.listeners,string"` // number of pending refresh listeners on primaries
  314. SearchFetchCurrent int `json:"search.fetch_current,string"` // current fetch phase ops on primaries & replicas
  315. PriSearchFetchCurrent int `json:"pri.search.fetch_current,string"` // current fetch phase ops on primaries
  316. SearchFetchTime string `json:"search.fetch_time"` // time spent in fetch phase on primaries & replicas
  317. PriSearchFetchTime string `json:"pri.search.fetch_time"` // time spent in fetch phase on primaries
  318. SearchFetchTotal int `json:"search.fetch_total,string"` // total fetch ops on primaries & replicas
  319. PriSearchFetchTotal int `json:"pri.search.fetch_total,string"` // total fetch ops on primaries
  320. SearchOpenContexts int `json:"search.open_contexts,string"` // open search contexts on primaries & replicas
  321. PriSearchOpenContexts int `json:"pri.search.open_contexts,string"` // open search contexts on primaries
  322. SearchQueryCurrent int `json:"search.query_current,string"` // current query phase ops on primaries & replicas
  323. PriSearchQueryCurrent int `json:"pri.search.query_current,string"` // current query phase ops on primaries
  324. SearchQueryTime string `json:"search.query_time"` // time spent in query phase on primaries & replicas, e.g. "0s"
  325. PriSearchQueryTime string `json:"pri.search.query_time"` // time spent in query phase on primaries, e.g. "0s"
  326. SearchQueryTotal int `json:"search.query_total,string"` // total query phase ops on primaries & replicas
  327. PriSearchQueryTotal int `json:"pri.search.query_total,string"` // total query phase ops on primaries
  328. SearchScrollCurrent int `json:"search.scroll_current,string"` // open scroll contexts on primaries & replicas
  329. PriSearchScrollCurrent int `json:"pri.search.scroll_current,string"` // open scroll contexts on primaries
  330. SearchScrollTime string `json:"search.scroll_time"` // time scroll contexts held open on primaries & replicas, e.g. "0s"
  331. PriSearchScrollTime string `json:"pri.search.scroll_time"` // time scroll contexts held open on primaries, e.g. "0s"
  332. SearchScrollTotal int `json:"search.scroll_total,string"` // completed scroll contexts on primaries & replicas
  333. PriSearchScrollTotal int `json:"pri.search.scroll_total,string"` // completed scroll contexts on primaries
  334. SearchThrottled bool `json:"search.throttled,string"` // indicates if the index is search throttled
  335. SegmentsCount int `json:"segments.count,string"` // number of segments on primaries & replicas
  336. PriSegmentsCount int `json:"pri.segments.count,string"` // number of segments on primaries
  337. SegmentsMemory string `json:"segments.memory"` // memory used by segments on primaries & replicas, e.g. "1.3kb"
  338. PriSegmentsMemory string `json:"pri.segments.memory"` // memory used by segments on primaries, e.g. "1.3kb"
  339. SegmentsIndexWriterMemory string `json:"segments.index_writer_memory"` // memory used by index writer on primaries & replicas, e.g. "0b"
  340. PriSegmentsIndexWriterMemory string `json:"pri.segments.index_writer_memory"` // memory used by index writer on primaries, e.g. "0b"
  341. SegmentsVersionMapMemory string `json:"segments.version_map_memory"` // memory used by version map on primaries & replicas, e.g. "0b"
  342. PriSegmentsVersionMapMemory string `json:"pri.segments.version_map_memory"` // memory used by version map on primaries, e.g. "0b"
  343. SegmentsFixedBitsetMemory string `json:"segments.fixed_bitset_memory"` // memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields on primaries & replicas, e.g. "0b"
  344. PriSegmentsFixedBitsetMemory string `json:"pri.segments.fixed_bitset_memory"` // memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields on primaries, e.g. "0b"
  345. WarmerCurrent int `json:"warmer.current,string"` // current warmer ops on primaries & replicas
  346. PriWarmerCurrent int `json:"pri.warmer.current,string"` // current warmer ops on primaries
  347. WarmerTotal int `json:"warmer.total,string"` // total warmer ops on primaries & replicas
  348. PriWarmerTotal int `json:"pri.warmer.total,string"` // total warmer ops on primaries
  349. WarmerTotalTime string `json:"warmer.total_time"` // time spent in warmers on primaries & replicas, e.g. "47s"
  350. PriWarmerTotalTime string `json:"pri.warmer.total_time"` // time spent in warmers on primaries, e.g. "47s"
  351. SuggestCurrent int `json:"suggest.current,string"` // number of current suggest ops on primaries & replicas
  352. PriSuggestCurrent int `json:"pri.suggest.current,string"` // number of current suggest ops on primaries
  353. SuggestTime string `json:"suggest.time"` // time spend in suggest on primaries & replicas, "31s"
  354. PriSuggestTime string `json:"pri.suggest.time"` // time spend in suggest on primaries, e.g. "31s"
  355. SuggestTotal int `json:"suggest.total,string"` // number of suggest ops on primaries & replicas
  356. PriSuggestTotal int `json:"pri.suggest.total,string"` // number of suggest ops on primaries
  357. MemoryTotal string `json:"memory.total"` // total user memory on primaries & replicas, e.g. "1.5kb"
  358. PriMemoryTotal string `json:"pri.memory.total"` // total user memory on primaries, e.g. "1.5kb"
  359. }
  360. // catIndicesResponseRowAliasesMap holds the global map for columns aliases
  361. // the map is used by CatIndicesService.buildURL
  362. // for backwards compatibility some fields are able to have the same aliases
  363. // that means that one alias can be translated to different columns (from different elastic versions)
  364. // example for understanding: rto -> RefreshTotal, RefreshExternalTotal
  365. var catIndicesResponseRowAliasesMap = map[string]string{
  366. "qce": "query_cache.evictions",
  367. "searchFetchTime": "search.fetch_time",
  368. "memoryTotal": "memory.total",
  369. "requestCacheEvictions": "request_cache.evictions",
  370. "ftt": "flush.total_time",
  371. "iic": "indexing.index_current",
  372. "mtt": "merges.total_time",
  373. "scti": "search.scroll_time",
  374. "searchScrollTime": "search.scroll_time",
  375. "segmentsCount": "segments.count",
  376. "getTotal": "get.total",
  377. "sfti": "search.fetch_time",
  378. "searchScrollCurrent": "search.scroll_current",
  379. "svmm": "segments.version_map_memory",
  380. "warmerTotalTime": "warmer.total_time",
  381. "r": "rep",
  382. "indexingIndexTime": "indexing.index_time",
  383. "refreshTotal": "refresh.total,refresh.external_total",
  384. "scc": "search.scroll_current",
  385. "suggestTime": "suggest.time",
  386. "idc": "indexing.delete_current",
  387. "rti": "refresh.time,refresh.external_time",
  388. "sfto": "search.fetch_total",
  389. "completionSize": "completion.size",
  390. "mt": "merges.total",
  391. "segmentsVersionMapMemory": "segments.version_map_memory",
  392. "rto": "refresh.total,refresh.external_total",
  393. "id": "uuid",
  394. "dd": "docs.deleted",
  395. "docsDeleted": "docs.deleted",
  396. "fielddataMemory": "fielddata.memory_size",
  397. "getTime": "get.time",
  398. "getExistsTime": "get.exists_time",
  399. "mtd": "merges.total_docs",
  400. "rli": "refresh.listeners",
  401. "h": "health",
  402. "cds": "creation.date.string",
  403. "rcmc": "request_cache.miss_count",
  404. "iif": "indexing.index_failed",
  405. "warmerCurrent": "warmer.current",
  406. "gti": "get.time",
  407. "indexingIndexFailed": "indexing.index_failed",
  408. "mts": "merges.total_size",
  409. "sqti": "search.query_time",
  410. "segmentsIndexWriterMemory": "segments.index_writer_memory",
  411. "iiti": "indexing.index_time",
  412. "iito": "indexing.index_total",
  413. "cd": "creation.date",
  414. "gc": "get.current",
  415. "searchFetchTotal": "search.fetch_total",
  416. "sqc": "search.query_current",
  417. "segmentsMemory": "segments.memory",
  418. "dc": "docs.count",
  419. "qcm": "query_cache.memory_size",
  420. "queryCacheMemory": "query_cache.memory_size",
  421. "mergesTotalDocs": "merges.total_docs",
  422. "searchOpenContexts": "search.open_contexts",
  423. "shards.primary": "pri",
  424. "cs": "completion.size",
  425. "mergesTotalTIme": "merges.total_time",
  426. "wtt": "warmer.total_time",
  427. "mergesCurrentSize": "merges.current_size",
  428. "mergesTotal": "merges.total",
  429. "refreshTime": "refresh.time,refresh.external_time",
  430. "wc": "warmer.current",
  431. "p": "pri",
  432. "idti": "indexing.delete_time",
  433. "searchQueryCurrent": "search.query_current",
  434. "warmerTotal": "warmer.total",
  435. "suggestTotal": "suggest.total",
  436. "tm": "memory.total",
  437. "ss": "store.size",
  438. "ft": "flush.total",
  439. "getExistsTotal": "get.exists_total",
  440. "scto": "search.scroll_total",
  441. "s": "status",
  442. "queryCacheEvictions": "query_cache.evictions",
  443. "rce": "request_cache.evictions",
  444. "geto": "get.exists_total",
  445. "refreshListeners": "refresh.listeners",
  446. "suto": "suggest.total",
  447. "storeSize": "store.size",
  448. "gmti": "get.missing_time",
  449. "indexingIdexCurrent": "indexing.index_current",
  450. "searchFetchCurrent": "search.fetch_current",
  451. "idx": "index",
  452. "fm": "fielddata.memory_size",
  453. "geti": "get.exists_time",
  454. "indexingDeleteCurrent": "indexing.delete_current",
  455. "mergesCurrentDocs": "merges.current_docs",
  456. "sth": "search.throttled",
  457. "flushTotal": "flush.total",
  458. "sfc": "search.fetch_current",
  459. "wto": "warmer.total",
  460. "suti": "suggest.time",
  461. "shardsReplica": "rep",
  462. "mergesCurrent": "merges.current",
  463. "mcs": "merges.current_size",
  464. "so": "search.open_contexts",
  465. "i": "index",
  466. "siwm": "segments.index_writer_memory",
  467. "sfbm": "segments.fixed_bitset_memory",
  468. "fe": "fielddata.evictions",
  469. "requestCacheMissCount": "request_cache.miss_count",
  470. "idto": "indexing.delete_total",
  471. "mergesTotalSize": "merges.total_size",
  472. "suc": "suggest.current",
  473. "suggestCurrent": "suggest.current",
  474. "flushTotalTime": "flush.total_time",
  475. "getMissingTotal": "get.missing_total",
  476. "sqto": "search.query_total",
  477. "searchScrollTotal": "search.scroll_total",
  478. "fixedBitsetMemory": "segments.fixed_bitset_memory",
  479. "getMissingTime": "get.missing_time",
  480. "indexingDeleteTotal": "indexing.delete_total",
  481. "mcd": "merges.current_docs",
  482. "docsCount": "docs.count",
  483. "gto": "get.total",
  484. "mc": "merges.current",
  485. "fielddataEvictions": "fielddata.evictions",
  486. "rcm": "request_cache.memory_size",
  487. "requestCacheHitCount": "request_cache.hit_count",
  488. "gmto": "get.missing_total",
  489. "searchQueryTime": "search.query_time",
  490. "shards.replica": "rep",
  491. "requestCacheMemory": "request_cache.memory_size",
  492. "rchc": "request_cache.hit_count",
  493. "getCurrent": "get.current",
  494. "indexingIndexTotal": "indexing.index_total",
  495. "sc": "segments.count,segments.memory",
  496. "shardsPrimary": "pri",
  497. "indexingDeleteTime": "indexing.delete_time",
  498. "searchQueryTotal": "search.query_total",
  499. }