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):
167167 free_by_flavor_total = prom_core .GaugeMetricFamily (
168168 "openstack_free_capacity_by_flavor_total" ,
169169 "Free capacity if you fill the cloud full of each flavor" ,
170- labels = ["flavor_name" ],
170+ labels = ["flavor_name" , "public" ],
171171 )
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 ()
175175 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 )
177177 # print(f'openstack_free_capacity_by_flavor{{flavor="{flavor_name}"}} {total}')
178178
179179 # capacity per host
You can’t perform that action at this time.
0 commit comments