Skip to content

Commit 42e1907

Browse files
committed
Extract the host string
So we can add the groups
1 parent bdaf95a commit 42e1907

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

os_capacity/prometheus.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def print_details(compute_client, placement_client):
8888
our_count = all_counts.get(rp_id, 0)
8989
if our_count == 0:
9090
continue
91+
host_str = f'hypervisor="{hostname}"'
9192
print(
92-
f'openstack_capacity_by_hostname{{hypervisor="{hostname}",flavor="{flavor_name}"}} {our_count}'
93+
f'openstack_capacity_by_hostname{{{host_str},flavor="{flavor_name}"}} {our_count}'
9394
)
9495

9596

0 commit comments

Comments
 (0)