-
-
Notifications
You must be signed in to change notification settings - Fork 145
openstack_nova_running_vms metrics erroring out #491
Description
I am using openstack exporter for prometheus https://github.com/openstack-exporter/openstack-exporter but I am not getting openstack_nova_running_vms metrics and I see an error message in logs
time="2025-09-25T21:36:07Z" level=error msg="Failed to collect metric for exporter: nova, error: failed to collect metric: running_vms, error: CPUInfo has unexpected type: <nil>" source="exporter.go:123"
I checked
#openstack hypervisor show and indeed cpu_info is None
| cpu_info | None
my nove.conf file and I see cpu_mode is defiened as passthrough and we can not change it as we need that.
looks like code is coming from https://github.com/openstack-exporter/openstack-exporter/blob/main/exporters/nova.go around line 224, where it bails our as in my case CPU_Info is None. In my view code should gracefully handle if cpu_info comes as nil or None instead of erroring and not provide any metrics for running vms.