File: indices_response.go

package info (click to toggle)
prometheus-elasticsearch-exporter 1.1.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 716 kB
  • sloc: makefile: 75; sh: 50
file content (201 lines) | stat: -rw-r--r-- 9,191 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
package collector

// indexStatsResponse is a representation of a Elasticsearch Index Stats
type indexStatsResponse struct {
	Shards  IndexStatsShardsResponse           `json:"_shards"`
	All     IndexStatsIndexResponse            `json:"_all"`
	Indices map[string]IndexStatsIndexResponse `json:"indices"`
}

// IndexStatsShardsResponse defines index stats shards information structure
type IndexStatsShardsResponse struct {
	Total      int64 `json:"total"`
	Successful int64 `json:"successful"`
	Failed     int64 `json:"failed"`
}

// IndexStatsIndexResponse defines index stats index information structure
type IndexStatsIndexResponse struct {
	Primaries IndexStatsIndexDetailResponse                    `json:"primaries"`
	Total     IndexStatsIndexDetailResponse                    `json:"total"`
	Shards    map[string][]IndexStatsIndexShardsDetailResponse `json:"shards"`
}

// IndexStatsIndexDetailResponse defines index stats index details information structure
type IndexStatsIndexDetailResponse struct {
	Docs         IndexStatsIndexDocsResponse         `json:"docs"`
	Store        IndexStatsIndexStoreResponse        `json:"store"`
	Indexing     IndexStatsIndexIndexingResponse     `json:"indexing"`
	Get          IndexStatsIndexGetResponse          `json:"get"`
	Search       IndexStatsIndexSearchResponse       `json:"search"`
	Merges       IndexStatsIndexMergesResponse       `json:"merges"`
	Refresh      IndexStatsIndexRefreshResponse      `json:"refresh"`
	Flush        IndexStatsIndexFlushResponse        `json:"flush"`
	Warmer       IndexStatsIndexWarmerResponse       `json:"warmer"`
	QueryCache   IndexStatsIndexQueryCacheResponse   `json:"query_cache"`
	Fielddata    IndexStatsIndexFielddataResponse    `json:"fielddata"`
	Completion   IndexStatsIndexCompletionResponse   `json:"completion"`
	Segments     IndexStatsIndexSegmentsResponse     `json:"segments"`
	Translog     IndexStatsIndexTranslogResponse     `json:"translog"`
	RequestCache IndexStatsIndexRequestCacheResponse `json:"request_cache"`
	Recovery     IndexStatsIndexRecoveryResponse     `json:"recovery"`
}

// IndexStatsIndexShardsDetailResponse defines index stats index shard details information structure
type IndexStatsIndexShardsDetailResponse struct {
	*IndexStatsIndexDetailResponse
	Routing IndexStatsIndexRoutingResponse `json:"routing"`
}

// IndexStatsIndexRoutingResponse defines index stats index routing information structure
type IndexStatsIndexRoutingResponse struct {
	Node    string `json:"node"`
	Primary bool   `json:"primary"`
}

// IndexStatsIndexDocsResponse defines index stats index documents information structure
type IndexStatsIndexDocsResponse struct {
	Count   int64 `json:"count"`
	Deleted int64 `json:"deleted"`
}

// IndexStatsIndexStoreResponse defines index stats index store information structure
type IndexStatsIndexStoreResponse struct {
	SizeInBytes          int64 `json:"size_in_bytes"`
	ThrottleTimeInMillis int64 `json:"throttle_time_in_millis"`
}

// IndexStatsIndexIndexingResponse defines index stats index indexing information structure
type IndexStatsIndexIndexingResponse struct {
	IndexTotal           int64 `json:"index_total"`
	IndexTimeInMillis    int64 `json:"index_time_in_millis"`
	IndexCurrent         int64 `json:"index_current"`
	IndexFailed          int64 `json:"index_failed"`
	DeleteTotal          int64 `json:"delete_total"`
	DeleteTimeInMillis   int64 `json:"delete_time_in_millis"`
	DeleteCurrent        int64 `json:"delete_current"`
	NoopUpdateTotal      int64 `json:"noop_update_total"`
	IsThrottled          bool  `json:"is_throttled"`
	ThrottleTimeInMillis int64 `json:"throttle_time_in_millis"`
}

// IndexStatsIndexGetResponse defines index stats index get information structure
type IndexStatsIndexGetResponse struct {
	Total               int64 `json:"total"`
	TimeInMillis        int64 `json:"time_in_millis"`
	ExistsTotal         int64 `json:"exists_total"`
	ExistsTimeInMillis  int64 `json:"exists_time_in_millis"`
	MissingTotal        int64 `json:"missing_total"`
	MissingTimeInMillis int64 `json:"missing_time_in_millis"`
	Current             int64 `json:"current"`
}

// IndexStatsIndexSearchResponse defines index stats index search information structure
type IndexStatsIndexSearchResponse struct {
	OpenContexts        int64 `json:"open_contexts"`
	QueryTotal          int64 `json:"query_total"`
	QueryTimeInMillis   int64 `json:"query_time_in_millis"`
	QueryCurrent        int64 `json:"query_current"`
	FetchTotal          int64 `json:"fetch_total"`
	FetchTimeInMillis   int64 `json:"fetch_time_in_millis"`
	FetchCurrent        int64 `json:"fetch_current"`
	ScrollTotal         int64 `json:"scroll_total"`
	ScrollTimeInMillis  int64 `json:"scroll_time_in_millis"`
	ScrollCurrent       int64 `json:"scroll_current"`
	SuggestTotal        int64 `json:"suggest_total"`
	SuggestTimeInMillis int64 `json:"suggest_time_in_millis"`
	SuggestCurrent      int64 `json:"suggest_current"`
}

// IndexStatsIndexMergesResponse defines index stats index merges information structure
type IndexStatsIndexMergesResponse struct {
	Current                    int64 `json:"current"`
	CurrentDocs                int64 `json:"current_docs"`
	CurrentSizeInBytes         int64 `json:"current_size_in_bytes"`
	Total                      int64 `json:"total"`
	TotalTimeInMillis          int64 `json:"total_time_in_millis"`
	TotalDocs                  int64 `json:"total_docs"`
	TotalSizeInBytes           int64 `json:"total_size_in_bytes"`
	TotalStoppedTimeInMillis   int64 `json:"total_stopped_time_in_millis"`
	TotalThrottledTimeInMillis int64 `json:"total_throttled_time_in_millis"`
	TotalAutoThrottleInBytes   int64 `json:"total_auto_throttle_in_bytes"`
}

// IndexStatsIndexRefreshResponse defines index stats index refresh information structure
type IndexStatsIndexRefreshResponse struct {
	Total             int64 `json:"total"`
	TotalTimeInMillis int64 `json:"total_time_in_millis"`
	Listeners         int64 `json:"listeners"`
}

// IndexStatsIndexFlushResponse defines index stats index flush information structure
type IndexStatsIndexFlushResponse struct {
	Total             int64 `json:"total"`
	TotalTimeInMillis int64 `json:"total_time_in_millis"`
}

// IndexStatsIndexWarmerResponse defines index stats index warmer information structure
type IndexStatsIndexWarmerResponse struct {
	Current           int64 `json:"current"`
	Total             int64 `json:"total"`
	TotalTimeInMillis int64 `json:"total_time_in_millis"`
}

// IndexStatsIndexQueryCacheResponse defines index stats index query cache information structure
type IndexStatsIndexQueryCacheResponse struct {
	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
	TotalCount        int64 `json:"total_count"`
	HitCount          int64 `json:"hit_count"`
	MissCount         int64 `json:"miss_count"`
	CacheSize         int64 `json:"cache_size"`
	CacheCount        int64 `json:"cache_count"`
	Evictions         int64 `json:"evictions"`
}

// IndexStatsIndexFielddataResponse defines index stats index fielddata information structure
type IndexStatsIndexFielddataResponse struct {
	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
	Evictions         int64 `json:"evictions"`
}

// IndexStatsIndexCompletionResponse defines index stats index completion information structure
type IndexStatsIndexCompletionResponse struct {
	SizeInBytes int64 `json:"size_in_bytes"`
}

// IndexStatsIndexSegmentsResponse defines index stats index segments information structure
type IndexStatsIndexSegmentsResponse struct {
	Count                     int64 `json:"count"`
	MemoryInBytes             int64 `json:"memory_in_bytes"`
	TermsMemoryInBytes        int64 `json:"terms_memory_in_bytes"`
	StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"`
	TermVectorsMemoryInBytes  int64 `json:"term_vectors_memory_in_bytes"`
	NormsMemoryInBytes        int64 `json:"norms_memory_in_bytes"`
	PointsMemoryInBytes       int64 `json:"points_memory_in_bytes"`
	DocValuesMemoryInBytes    int64 `json:"doc_values_memory_in_bytes"`
	IndexWriterMemoryInBytes  int64 `json:"index_writer_memory_in_bytes"`
	VersionMapMemoryInBytes   int64 `json:"version_map_memory_in_bytes"`
	FixedBitSetMemoryInBytes  int64 `json:"fixed_bit_set_memory_in_bytes"`
	MaxUnsafeAutoIDTimestamp  int64 `json:"max_unsafe_auto_id_timestamp"`
}

// IndexStatsIndexTranslogResponse defines index stats index translog information structure
type IndexStatsIndexTranslogResponse struct {
	Operations  int64 `json:"operations"`
	SizeInBytes int64 `json:"size_in_bytes"`
}

// IndexStatsIndexRequestCacheResponse defines index stats index request cache information structure
type IndexStatsIndexRequestCacheResponse struct {
	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
	Evictions         int64 `json:"evictions"`
	HitCount          int64 `json:"hit_count"`
	MissCount         int64 `json:"miss_count"`
}

// IndexStatsIndexRecoveryResponse defines index stats index recovery information structure
type IndexStatsIndexRecoveryResponse struct {
	CurrentAsSource      int64 `json:"current_as_source"`
	CurrentAsTarget      int64 `json:"current_as_target"`
	ThrottleTimeInMillis int64 `json:"throttle_time_in_millis"`
}