@@ -33,19 +33,19 @@ type Shard struct {
33
33
}
34
34
35
35
type AssignedShard struct {
36
- ShardNum int32 `json:"shardNum "`
36
+ ShardNum int32 `json:"shard_num "`
37
37
Primary bool `json:"primary"`
38
- SizeInBytes * int64 `json:"sizeInBytes "`
39
- DocsCount * int64 `json:"docsCount "`
40
- SegmentsCount * int64 `json:"segmentsCount "`
38
+ SizeInBytes * int64 `json:"size_in_bytes "`
39
+ DocsCount * int64 `json:"docs_count "`
40
+ SegmentsCount * int64 `json:"segments_count "`
41
41
State string `json:"state"`
42
42
}
43
43
44
44
type UnassignedShard struct {
45
- ShardNum int32 `json:"shardNum "`
45
+ ShardNum int32 `json:"shard_num "`
46
46
Primary bool `json:"primary"`
47
- UnassignedReason * string `json:"unassignedReason "`
48
- UnassignedDetails * string `json:"unassignedDetails "`
47
+ UnassignedReason * string `json:"unassigned_reason "`
48
+ UnassignedDetails * string `json:"unassigned_details "`
49
49
}
50
50
51
51
type IndexMetadata struct {
@@ -58,63 +58,63 @@ type IndexMetadata struct {
58
58
}
59
59
60
60
type NodeIndexShards struct {
61
- TotalFractions int32 `json:"totalFractions "`
61
+ TotalFractions int32 `json:"total_fractions "`
62
62
63
63
Index string `json:"index"`
64
- IndexNode string `json:"indexNode "`
65
- IndexStatus * string `json:"indexStatus "`
66
- IndexType * string `json:"indexType "`
64
+ IndexNode string `json:"index_node "`
65
+ IndexStatus * string `json:"index_status "`
66
+ IndexType * string `json:"index_type "`
67
67
Aliases []string `json:"aliases"`
68
68
Attributes []string `json:"attributes"`
69
- IsHidden * bool `json:"isHidden "`
70
- IsOpen * bool `json:"isOpen "`
71
- IsSystem * bool `json:"isSystem "`
72
- NodeId string `json:"nodeId "`
73
- NodeName string `json:"nodeName "`
74
- AssignShards []AssignedShard `json:"assignShards "`
75
- InitializingShards []AssignedShard `json:"initializingShards "`
76
- RelocatingShards []AssignedShard `json:"relocatingShards "`
77
- UnassignedShards []UnassignedShard `json:"unAssignShards "`
78
- Shards int32 `json:"shardsCount "`
79
- PrimaryShards int32 `json:"primaryShardsCount "`
80
- ReplicaShards int32 `json:"replicaShardsCount "`
81
- Initializing int32 `json:"initializingShardsCount "`
82
- Relocating int32 `json:"relocatingShardsCount "`
83
- Unassigned int32 `json:"unassignedShardsCount "`
84
- UnassignedPrimaryShards int32 `json:"totalUnAssignedPrimaryShards "`
85
- UnassignedReplicasShards int32 `json:"totalUnAssignedReplicasShards "`
86
- SegmentsCount * int64 `json:"segmentsCount "`
87
- SizeInBytes * int64 `json:"sizeInBytes "`
88
- TotalSegmentsCount * int64 `json:"totalSegmentsCount "` // includes replicas
89
- TotalSizeInBytes * int64 `json:"totalSizeInBytes"` // includes replicas
90
- MaxShardSizeInBytes * int64 `json:"maxShardSizeInBytes "`
91
- MinShardSizeInBytes * int64 `json:"minShardSizeInBytes "`
92
- TotalMaxShardSizeInBytes * int64 `json:"totalMaxShardSizeInBytes "` // includes replicas
93
- TotalMinShardSizeInBytes * int64 `json:"totalMinShardSizeInBytes "` // includes replicas
69
+ IsHidden * bool `json:"is_hidden "`
70
+ IsOpen * bool `json:"is_open "`
71
+ IsSystem * bool `json:"is_system "`
72
+ NodeId string `json:"node_id "`
73
+ NodeName string `json:"node_name "`
74
+ AssignShards []AssignedShard `json:"assign_shards "`
75
+ InitializingShards []AssignedShard `json:"initializing_shards "`
76
+ RelocatingShards []AssignedShard `json:"relocating_shards "`
77
+ UnassignedShards []UnassignedShard `json:"unassign_shards "`
78
+ Shards int32 `json:"shards_count "`
79
+ PrimaryShards int32 `json:"primary_shards_count "`
80
+ ReplicaShards int32 `json:"replica_shards_count "`
81
+ Initializing int32 `json:"initializing_shards_count "`
82
+ Relocating int32 `json:"relocating_shards_count "`
83
+ Unassigned int32 `json:"unassigned_shards_count "`
84
+ UnassignedPrimaryShards int32 `json:"total_unassigned_primary_shards "`
85
+ UnassignedReplicasShards int32 `json:"total_unassigned_replicas_shards "`
86
+ SegmentsCount * int64 `json:"segments_count "`
87
+ SizeInBytes * int64 `json:"size_in_bytes "`
88
+ TotalSegmentsCount * int64 `json:"total_segments_count "` // includes replicas
89
+ TotalSizeInBytes * int64 `json:"total_size_in_bytes"` // includes replicas
90
+ MaxShardSizeInBytes * int64 `json:"max_shard_size_in_bytes "`
91
+ MinShardSizeInBytes * int64 `json:"min_shard_size_in_bytes "`
92
+ TotalMaxShardSizeInBytes * int64 `json:"total_max_shard_size_in_bytes "` // includes replicas
93
+ TotalMinShardSizeInBytes * int64 `json:"total_min_shard_size_in_bytes "` // includes replicas
94
94
95
95
// indexing metrics only consider primary shards!
96
96
97
- DocsCount * int64 `json:"docsCount "`
98
- IndexFailedRatePerSecond * float64 `json:"indexFailedRatePerSecond "`
99
- IndexLatencyInMillis * float64 `json:"indexLatencyInMillis "`
100
- IndexRatePerSecond * float64 `json:"indexRatePerSecond "`
101
- IndexingFailedIndexTotal * int64 `json:"indexingFailedIndexTotal "`
102
- IndexingIndexTotal * int64 `json:"indexingIndexTotal "`
103
- IndexingIndexTotalTime * int64 `json:"indexingTotalTime "`
104
- GetMissingDocTotal * int64 `json:"getMissingDocTotal"` // includes replicas
105
- GetMissingDocTotalTime * int64 `json:"getMissingDocTotalTime"` // includes replicas
106
- GetMissingDocRatePerSecond * float64 `json:"getDocMissingRatePerSecond "` // includes replicas
107
- MergeLatencyInMillis * float64 `json:"mergeLatencyInMillis "`
108
- MergeRatePerSecond * float64 `json:"mergeRatePerSecond "`
109
- MergesTotal * int64 `json:"mergesTotal "`
110
- MergesTotalTime * int64 `json:"mergesTotalTime "`
111
- SearchLatencyInMillis * float64 `json:"searchLatencyInMillis "` // includes replicas
112
- SearchQueryTime * int64 `json:"searchQueryTime"` // includes replicas
113
- SearchQueryTotal * int64 `json:"searchQueryTotal"` // includes replicas
114
- SearchRatePerSecond * float64 `json:"searchRatePerSecond "` // includes replicas
115
- TotalMergesTotal * int64 `json:"totalMergesTotal"` // includes replicas
116
- TotalMergesTotalTime * int64 `json:"totalMergesTotalTime "` // includes replicas
117
- TimestampDiff * int64 `json:"timestampDiff "`
97
+ DocsCount * int64 `json:"docs_count "`
98
+ IndexFailedRatePerSecond * float64 `json:"index_failed_rate_per_second "`
99
+ IndexLatencyInMillis * float64 `json:"index_latency_in_millis "`
100
+ IndexRatePerSecond * float64 `json:"index_rate_per_second "`
101
+ IndexingFailedIndexTotal * int64 `json:"indexing_failed_index_total "`
102
+ IndexingIndexTotal * int64 `json:"indexing_index_total "`
103
+ IndexingIndexTotalTime * int64 `json:"indexing_index_total_time "`
104
+ GetMissingDocTotal * int64 `json:"get_missing_doc_total"` // includes replicas
105
+ GetMissingDocTotalTime * int64 `json:"get_missing_doc_total_time"` // includes replicas
106
+ GetMissingDocRatePerSecond * float64 `json:"get_missing_doc_rate_per_second "` // includes replicas
107
+ MergeLatencyInMillis * float64 `json:"merge_latency_in_millis "`
108
+ MergeRatePerSecond * float64 `json:"merge_rate_per_second "`
109
+ MergesTotal * int64 `json:"merges_total "`
110
+ MergesTotalTime * int64 `json:"merges_total_time "`
111
+ SearchLatencyInMillis * float64 `json:"search_latency_in_millis "` // includes replicas
112
+ SearchQueryTime * int64 `json:"search_query_time"` // includes replicas
113
+ SearchQueryTotal * int64 `json:"search_query_total"` // includes replicas
114
+ SearchRatePerSecond * float64 `json:"search_rate_per_second "` // includes replicas
115
+ TotalMergesTotal * int64 `json:"total_merges_total"` // includes replicas
116
+ TotalMergesTotalTime * int64 `json:"total_merges_total_time "` // includes replicas
117
+ TimestampDiff * int64 `json:"timestamp_diff "`
118
118
}
119
119
120
120
type NodeShardCount struct {
@@ -132,13 +132,13 @@ type NodeShardCount struct {
132
132
}
133
133
134
134
type ShardInfo struct {
135
- ShardNum string `json:"shardNum "`
136
- ShardId string `json:"shardId "`
135
+ ShardNum string `json:"shard_num "`
136
+ ShardId string `json:"shard_id "`
137
137
Primary bool `json:"primary"`
138
- SizeInBytes uint64 `json:"sizeInBytes "`
139
- DocsCount uint64 `json:"docsCount "`
140
- UnAssignedReason string `json:"unassignedReason "`
141
- UnAssignedDetails string `json:"unassignedDetails "`
138
+ SizeInBytes uint64 `json:"size_in_bytes "`
139
+ DocsCount uint64 `json:"docs_count "`
140
+ UnAssignedReason string `json:"unassigned_reason "`
141
+ UnAssignedDetails string `json:"unassigned_details "`
142
142
}
143
143
144
144
func toAssignedShard (shard Shard ) AssignedShard {
0 commit comments