1package elastigo
2
3type NodeStatsResponse struct {
4	ClusterName string `json:"cluster_name"`
5	Nodes       map[string]NodeStatsNodeResponse
6}
7
8type NodeStatsNodeResponse struct {
9	Name             string                                     `json:"name"`
10	Timestamp        int64                                      `json:"timestamp"`
11	TransportAddress string                                     `json:"transport_address"`
12	Hostname         string                                     `json:"hostname"`
13	Host             string                                     `json:"host"`
14	IP               []string                                   `json:"ip"`
15	Attributes       NodeStatsNodeAttributes                    `json:"attributes"`
16	Indices          NodeStatsIndicesResponse                   `json:"indices"`
17	OS               NodeStatsOSResponse                        `json:"os"`
18	Process          NodeStatsProcessResponse                   `json:"process"`
19	JVM              NodeStatsJVMResponse                       `json:"jvm"`
20	Network          NodeStatsNetworkResponse                   `json:"network"`
21	FS               NodeStatsFSResponse                        `json:"fs"`
22	ThreadPool       map[string]NodeStatsThreadPoolPoolResponse `json:"thread_pool"`
23	Transport        NodeStatsTransportResponse                 `json:"transport"`
24	FieldDataBreaker NodeStatsFieldDataBreakerResponse          `json:"fielddata_breaker"`
25}
26
27type NodeStatsNodeAttributes struct {
28	Data   string `json:"data"`
29	Client string `json:"client"`
30}
31type NodeStatsNetworkResponse struct {
32	TCP NodeStatsTCPResponse `json:"tcp"`
33}
34
35type NodeStatsFieldDataBreakerResponse struct {
36	MaximumSizeInBytes   int64   `json:"maximum_size_in_bytes"`
37	MaximumSize          string  `json:"maximum_size"`
38	EstimatedSizeInBytes int64   `json:"estimated_size_in_bytes"`
39	EstimatedSize        string  `json:"estimated_size"`
40	Overhead             float64 `json:"overhead"`
41	Tripped              int64   `json:"tripped"`
42}
43type NodeStatsTransportResponse struct {
44	ServerOpen int64 `json:"server_open"`
45	RxCount    int64 `json:"rx_count"`
46	RxSize     int64 `json:"rx_size_in_bytes"`
47	TxCount    int64 `json:"tx_count"`
48	TxSize     int64 `json:"tx_size_in_bytes"`
49}
50
51type NodeStatsThreadPoolPoolResponse struct {
52	Threads   int64 `json:"threads"`
53	Queue     int64 `json:"queue"`
54	Active    int64 `json:"active"`
55	Rejected  int64 `json:"rejected"`
56	Largest   int64 `json:"largest"`
57	Completed int64 `json:"completed"`
58}
59
60type NodeStatsTCPResponse struct {
61	ActiveOpens  int64 `json:"active_opens"`
62	PassiveOpens int64 `json:"passive_opens"`
63	CurrEstab    int64 `json:"curr_estab"`
64	InSegs       int64 `json:"in_segs"`
65	OutSegs      int64 `json:"out_segs"`
66	RetransSegs  int64 `json:"retrans_segs"`
67	EstabResets  int64 `json:"estab_resets"`
68	AttemptFails int64 `json:"attempt_fails"`
69	InErrs       int64 `json:"in_errs"`
70	OutRsts      int64 `json:"out_rsts"`
71}
72
73type NodeStatsIndicesResponse struct {
74	Docs        NodeStatsIndicesDocsResponse        `json:"docs"`
75	Store       NodeStatsIndicesStoreResponse       `json:"store"`
76	Indexing    NodeStatsIndicesIndexingResponse    `json:"indexing"`
77	Get         NodeStatsIndicesGetResponse         `json:"get"`
78	Search      NodeStatsIndicesSearchResponse      `json:"search"`
79	Merges      NodeStatsIndicesMergesResponse      `json:"merges"`
80	Refresh     NodeStatsIndicesRefreshResponse     `json:"refresh"`
81	Flush       NodeStatsIndicesFlushResponse       `json:"flush"`
82	Warmer      NodeStatsIndicesWarmerResponse      `json:"warmer"`
83	FilterCache NodeStatsIndicesFilterCacheResponse `json:"filter_cache"`
84	IdCache     NodeStatsIndicesIdCacheResponse     `json:"id_cache"`
85	FieldData   NodeStatsIndicesFieldDataResponse   `json:"fielddata"`
86	Percolate   NodeStatsIndicesPercolateResponse   `json:"percolate"`
87	Completion  NodeStatsIndicesCompletionResponse  `json:"completion"`
88	Segments    NodeStatsIndicesSegmentsResponse    `json:"segments"`
89	Translog    NodeStatsIndicesTranslogResponse    `json:"translog"`
90	Suggest     NodeStatsIndicesSuggestResponse     `json:"suggest"`
91}
92
93type NodeStatsIndicesDocsResponse struct {
94	Count   int64 `json:"count"`
95	Deleted int64 `json:"deleted"`
96}
97
98type NodeStatsIndicesStoreResponse struct {
99	Size         int64 `json:"size_in_bytes"`
100	ThrottleTime int64 `json:"throttle_time_in_millis"`
101}
102
103type NodeStatsIndicesIndexingResponse struct {
104	IndexTotal    int64 `json:"index_total"`
105	IndexTime     int64 `json:"index_time_in_millis"`
106	IndexCurrent  int64 `json:"index_current"`
107	DeleteTotal   int64 `json:"delete_total"`
108	DeleteTime    int64 `json:"delete_time_in_millis"`
109	DeleteCurrent int64 `json:"delete_current"`
110}
111
112type NodeStatsIndicesGetResponse struct {
113	Total        int64 `json:"total"`
114	Time         int64 `json:"time_in_millis"`
115	ExistsTotal  int64 `json:"exists_total"`
116	ExistsTime   int64 `json:"exists_time_in_millis"`
117	MissingTotal int64 `json:"missing_total"`
118	MissingTime  int64 `json:"missing_time_in_millis"`
119	Current      int64 `json:"current"`
120}
121
122type NodeStatsIndicesSearchResponse struct {
123	OpenContext  int64 `json:"open_contexts"`
124	QueryTotal   int64 `json:"query_total"`
125	QueryTime    int64 `json:"query_time_in_millis"`
126	QueryCurrent int64 `json:"query_current"`
127	FetchTotal   int64 `json:"fetch_total"`
128	FetchTime    int64 `json:"fetch_time_in_millis"`
129	FetchCurrent int64 `json:"fetch_current"`
130}
131type NodeStatsIndicesMergesResponse struct {
132	Current            int64 `json:"current"`
133	CurrentDocs        int64 `json:"current_docs"`
134	CurrentSizeInBytes int64 `json:"current_size_in_bytes"`
135	Total              int64 `json:"total"`
136	TotalTimeInMs      int64 `json:"total_time_in_millis"`
137	TotalDocs          int64 `json:"total_docs"`
138	TotalSizeInBytes   int64 `json:"total_size_in_bytes"`
139}
140type NodeStatsIndicesRefreshResponse struct {
141	Total         int64 `json:"total"`
142	TotalTimeInMs int64 `json:"total_time_in_millis"`
143}
144type NodeStatsIndicesFlushResponse struct {
145	Total         int64 `json:"total"`
146	TotalTimeInMs int64 `json:"total_time_in_millis"`
147}
148type NodeStatsIndicesWarmerResponse struct {
149	Current       int64 `json:"current"`
150	Total         int64 `json:"total"`
151	TotalTimeInMs int64 `json:"total_time_in_millis"`
152}
153type NodeStatsIndicesFilterCacheResponse struct {
154	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
155	Evictions         int64 `json:"evictions"`
156}
157type NodeStatsIndicesIdCacheResponse struct {
158	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
159}
160type NodeStatsIndicesFieldDataResponse struct {
161	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
162	Evictions         int64 `json:"evictions"`
163}
164type NodeStatsIndicesPercolateResponse struct {
165	Total             int64  `json:"total"`
166	TimeInMs          int64  `json:"time_in_millis"`
167	Current           int64  `json:"current"`
168	MemorySizeInBytes int64  `json:"memory_size_in_bytes"`
169	MemorySize        string `json:"memory_size"`
170	Queries           int64  `json:"queries"`
171}
172type NodeStatsIndicesCompletionResponse struct {
173	SizeInBytes int64 `json:"size_in_bytes"`
174}
175type NodeStatsIndicesSegmentsResponse struct {
176	Count                    int64 `json:"count"`
177	MemoryInBytes            int64 `json:"memory_in_bytes"`
178	IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes"`
179	VersionMapMemoryInBytes  int64 `json:"version_map_memory_in_bytes"`
180}
181type NodeStatsIndicesTranslogResponse struct {
182	Operations  int64 `json:"operations"`
183	SizeInBytes int64 `json:"size_in_bytes"`
184}
185type NodeStatsIndicesSuggestResponse struct {
186	Total    int64 `json:"total"`
187	TimeInMs int64 `json:"time_in_millis"`
188	Current  int64 `json:"current"`
189}
190type NodeStatsOSResponse struct {
191	Timestamp int64                   `json:"timestamp"`
192	Uptime    int64                   `json:"uptime_in_millis"`
193	LoadAvg   []float64               `json:"load_average"`
194	CPU       NodeStatsOSCPUResponse  `json:"cpu"`
195	Mem       NodeStatsOSMemResponse  `json:"mem"`
196	Swap      NodeStatsOSSwapResponse `json:"swap"`
197}
198
199type NodeStatsOSMemResponse struct {
200	Free       int64 `json:"free_in_bytes"`
201	Used       int64 `json:"used_in_bytes"`
202	ActualFree int64 `json:"actual_free_in_bytes"`
203	ActualUsed int64 `json:"actual_used_in_bytes"`
204}
205
206type NodeStatsOSSwapResponse struct {
207	Used int64 `json:"used_in_bytes"`
208	Free int64 `json:"free_in_bytes"`
209}
210
211type NodeStatsOSCPUResponse struct {
212	Sys   int64 `json:"sys"`
213	User  int64 `json:"user"`
214	Idle  int64 `json:"idle"`
215	Steal int64 `json:"stolen"`
216}
217
218type NodeStatsProcessResponse struct {
219	Timestamp int64                       `json:"timestamp"`
220	OpenFD    int64                       `json:"open_file_descriptors"`
221	CPU       NodeStatsProcessCPUResponse `json:"cpu"`
222	Memory    NodeStatsProcessMemResponse `json:"mem"`
223}
224
225type NodeStatsProcessMemResponse struct {
226	Resident     int64 `json:"resident_in_bytes"`
227	Share        int64 `json:"share_in_bytes"`
228	TotalVirtual int64 `json:"total_virtual_in_bytes"`
229}
230
231type NodeStatsProcessCPUResponse struct {
232	Percent int64 `json:"percent"`
233	Sys     int64 `json:"sys_in_millis"`
234	User    int64 `json:"user_in_millis"`
235	Total   int64 `json:"total_in_millis"`
236}
237
238type NodeStatsJVMResponse struct {
239	Timestame   int64                                      `json:"timestamp"`
240	UptimeInMs  int64                                      `json:"uptime_in_millis"`
241	Mem         NodeStatsJVMMemResponse                    `json:"mem"`
242	Threads     NodeStatsJVMThreadsResponse                `json:"threads"`
243	GC          NodeStatsJVMGCResponse                     `json:"gc"`
244	BufferPools map[string]NodeStatsJVMBufferPoolsResponse `json:"buffer_pools"`
245}
246
247type NodeStatsJVMMemResponse struct {
248	HeapUsedInBytes         int64                                   `json:"heap_used_in_bytes"`
249	HeapUsedPercent         int64                                   `json:"heap_used_percent"`
250	HeapCommitedInBytes     int64                                   `json:"heap_commited_in_bytes"`
251	HeapMaxInBytes          int64                                   `json:"heap_max_in_bytes"`
252	NonHeapUsedInBytes      int64                                   `json:"non_heap_used_in_bytes"`
253	NonHeapCommittedInBytes int64                                   `json:"non_heap_committed_in_bytes"`
254	Pools                   map[string]NodeStatsJVMMemPoolsResponse `json:"pools"`
255}
256type NodeStatsJVMMemPoolsResponse struct {
257	UsedInBytes     int64 `json:"used_in_bytes"`
258	MaxInBytes      int64 `json:"max_in_bytes"`
259	PeakUsedInBytes int64 `json:"peak_used_in_bytes"`
260	PeakMaxInBytes  int64 `json:"peak_max_in_bytes"`
261}
262type NodeStatsJVMThreadsResponse struct {
263	Count     int64 `json:"count"`
264	PeakCount int64 `json:"peak_count"`
265}
266type NodeStatsJVMGCResponse struct {
267	Collectors map[string]NodeStatsJVMGCCollectorsAgeResponse `json:"collectors"`
268}
269type NodeStatsJVMGCCollectorsAgeResponse struct {
270	Count    int64 `json:"collection_count"`
271	TimeInMs int64 `json:"collection_time_in_millis"`
272}
273type NodeStatsJVMBufferPoolsResponse struct {
274	Count                int64 `json:"count"`
275	UsedInBytes          int64 `json:"used_in_bytes"`
276	TotalCapacityInBytes int64 `json:"total_capacity_in_bytes"`
277}
278type NodeStatsHTTPResponse struct {
279	CurrentOpen int64 `json:"current_open"`
280	TotalOpen   int64 `json:"total_open"`
281}
282
283type NodeStatsFSResponse struct {
284	Timestamp int64                     `json:"timestamp"`
285	Data      []NodeStatsFSDataResponse `json:"data"`
286}
287
288type NodeStatsFSDataResponse struct {
289	Path          string `json:"path"`
290	Mount         string `json:"mount"`
291	Device        string `json:"dev"`
292	Total         int64  `json:"total_in_bytes"`
293	Free          int64  `json:"free_in_bytes"`
294	Available     int64  `json:"available_in_bytes"`
295	DiskReads     int64  `json:"disk_reads"`
296	DiskWrites    int64  `json:"disk_writes"`
297	DiskReadSize  int64  `json:"disk_read_size_in_bytes"`
298	DiskWriteSize int64  `json:"disk_write_size_in_bytes"`
299}
300