File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -167,13 +167,13 @@ def get_host_details(compute_client, placement_client):
167
167
free_by_flavor_total = prom_core .GaugeMetricFamily (
168
168
"openstack_free_capacity_by_flavor_total" ,
169
169
"Free capacity if you fill the cloud full of each flavor" ,
170
- labels = ["flavor_name" ],
170
+ labels = ["flavor_name" , "public" ],
171
171
)
172
- flavor_names = sorted ([ f . name for f in flavors ])
173
- for flavor_name in flavor_names :
174
- counts = capacity_per_flavor .get (flavor_name , {}).values ()
172
+
173
+ for flavor in flavors :
174
+ counts = capacity_per_flavor .get (flavor . name , {}).values ()
175
175
total = 0 if not counts else sum (counts )
176
- free_by_flavor_total .add_metric ([flavor_name ], total )
176
+ free_by_flavor_total .add_metric ([flavor . name , str ( flavor . is_public ) ], total )
177
177
# print(f'openstack_free_capacity_by_flavor{{flavor="{flavor_name}"}} {total}')
178
178
179
179
# capacity per host
You can’t perform that action at this time.
0 commit comments