@@ -49,6 +49,7 @@ def collect(self):
49
49
yield from self .array_hw ()
50
50
yield from self .array_events ()
51
51
yield from self .array_space ()
52
+ yield from self .array_clientperf ()
52
53
yield from self .buckets_space ()
53
54
yield from self .filesystems_space ()
54
55
yield from self .array_perf ()
@@ -135,6 +136,65 @@ def array_space(self):
135
136
yield tot_physical
136
137
yield tot_snapshots
137
138
139
+
140
+ def array_clientperf (self ):
141
+ """
142
+ Create metrics of gauge type for client performance metrics.
143
+ Metrics values can be iterated over.
144
+ """
145
+ fb_clientperf = self .fb .arrays .list_client_performance ()
146
+ labels = ['name' ]
147
+ _b_op = GaugeMetricFamily ('purefb_clients_bytes_per_op' ,
148
+ 'FlashBlade clients bytes per operation' ,
149
+ labels = labels )
150
+ _b_rd = GaugeMetricFamily ('purefb_clients_bytes_per_read' ,
151
+ 'FlashBlade clients bytes per read' ,
152
+ labels = labels )
153
+ _b_wr = GaugeMetricFamily ('purefb_clients_bytes_per_write' ,
154
+ 'FlashBlade clients bytes per write' ,
155
+ labels = labels )
156
+ _others_iops = GaugeMetricFamily ('purefb_clients_others_ops' ,
157
+ 'FlashBlade clients others IOPS' ,
158
+ labels = labels )
159
+ _rd_iops = GaugeMetricFamily ('purefb_clients_read_ops' ,
160
+ 'FlashBlade clients read IOPS' ,
161
+ labels = labels )
162
+ _rd_bw = GaugeMetricFamily ('purefb_clients_read_bps' ,
163
+ 'FlashBlade clients read bandwidth' ,
164
+ labels = labels )
165
+ _others_lat = GaugeMetricFamily ('purefb_clients_others_latency_usec' ,
166
+ 'FlashBlade clients others latency' ,
167
+ labels = labels )
168
+ _rd_lat = GaugeMetricFamily ('purefb_clients_read_latency_usec' ,
169
+ 'FlashBlade clients read latency' ,
170
+ labels = labels )
171
+ _wr_lat = GaugeMetricFamily ('purefb_clients_write_latency_usec' ,
172
+ 'FlashBlade clients write latency' ,
173
+ labels = labels )
174
+ _wr_bw = GaugeMetricFamily ('purefb_clients_write_bps' ,
175
+ 'FlashBlade clients write bandwidth' ,
176
+ labels = labels )
177
+ _wr_iops = GaugeMetricFamily ('purefb_clients_write_ops' ,
178
+ 'FlashBlade clients write IOPS' ,
179
+ labels = labels )
180
+ for f in fb_clientperf .items :
181
+ _b_op .add_metric ([f .name ], fb_clientperf .bytes_per_op
182
+ _b_rd .add_metric ([f .name ], fb_clientperf .bytes_per_read
183
+ _b_wr .add_metric ([f .name ], fb_clientperf .bytes_per_write
184
+ _others_iops .add_metric ([f .name ], fb_clientperf .others_per_sec
185
+ _rd_iops .add_metric ([f .name ], fb_clientperf .read_bytes_per_sec
186
+ _rd_bw .add_metric ([f .name ], fb_clientperf .reads_per_sec
187
+ _others_lat .add_metric ([f .name ], fb_clientperf .usec_per_other_op
188
+ _rd_lat .add_metric ([f .name ], fb_clientperf .usec_per_read_op
189
+ _wr_lat .add_metric ([f .name ], fb_clientperf .usec_per_write_op
190
+ _wr_bw .add_metric ([f .name ], fb_clientperf .write_bytes_per_sec
191
+ _wr_iops .add_metric ([f .name ], fb_clientperf .writes_per_sec
192
+ metrics = [_b_op , _b_rd , _b_wr , _others_iops , _rd_iops , _rd_bw , _others_lat , \
193
+ _rd_lat , _wr_lat , _wr_bw , _wr_iops ]
194
+ for m in metrics :
195
+ yield m
196
+
197
+
138
198
def buckets_space (self ):
139
199
"""
140
200
Create metrics of gauge type for buckets space indicators, with the
0 commit comments