Skip to content

openstack_nova_running_vms metrics erroring out #491

@vipin5050

Description

@vipin5050

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions