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
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatus {
health: CephStatusHealth,
fsid: String,
election_epoch: u32,
quorum: Vec<u32>,
quorum_names: Vec<String>,
monmap: CephStatusMonMap,
osdmap: CephStatusOSDMapH,
pgmap: CephStatusPGMap,
mdsmap: CephStatusMDSMap,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealth {
health: CephStatusHealth2,
timechecks: CephStatusHealthTimeChecks,
summary: Vec<CephStatusHealthSummary>,
overall_status: String,
detail: Vec<CephStatusHealthDetail>,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealth2 {
health: Vec<CephStatusHealthServices>,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealthServices {
mons: Vec<CephStatusHealthServicesMon>,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealthServicesMon {
name: String,
kb_total: u32,
kb_used: u32,
kb_avail: u32,
avail_percent: u16,
last_updated: String,
store_stats: CephStatusHealthServicesMonStats,
health: String,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealthServicesMonStats {
bytes_total: u64,
bytes_sst: u64,
bytes_log: u64,
bytes_misc: u64,
last_updated: String,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealthTimeChecks {
epoch: u32,
round: u32,
round_status: String,
mons: Vec<CephStatusHealthMons>,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealthMons {
name: String,
skew: f32,
latency: f32,
health: String,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealthSummary {
severity: String,
summary: String,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusHealthDetail {
dummy: String,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusMonMap {
epoch: u32,
fsid: String,
modified: String,
created: String,
mons: Vec<CephStatusMonRank>,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusMonRank {
rank: u16,
name: String,
addr: String,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusOSDMapH {
osdmap: CephStatusOSDMapL,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusOSDMapL {
epoch: u32,
num_osds: u32,
num_up_osds: u32,
num_in_osds: u32,
full: bool,
nearfull: bool,
num_remapped_pgs: u32,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusPGMap {
pgs_by_state: Vec<CephStatusPGState>,
version: u32,
num_pgs: u32,
data_bytes: u64,
bytes_used: u64,
bytes_avail: u64,
bytes_total: u64,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusPGState {
state_name: String,
count: u32,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusMDSMap {
epoch: u32,
up: u32,
_in: u32,
max: u32,
by_rank: Vec<CephStatusMDSRank>,
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct CephStatusMDSRank {
rank: u16,
name: String,
addr: String,
}