Skip to content

Include XO tags in OpenMetrics metrics #9628

@tesarmar

Description

@tesarmar

Currently, the Xen Orchestra OpenMetrics exporter does not include object tags
(hosts, VMs, etc.) as metric labels.

This makes it difficult or impossible to selectively monitor resources in external
systems such as Zabbix, Prometheus, or Grafana, especially in MSP or multi-tenant
environments where tagging is commonly used for scoping.

Current limitation

For example, xcp_host_status exposes labels like:

  • uuid
  • host_name
  • pool_name
  • power_state
  • enabled

But it does not expose any tag-related information, even though tags are available
in XO.

Proposed improvement

Include tags as an additional label, for example:
tags="tag1,tag2,tag3"

Ideally for:

  • hosts (xcp_host_*)
  • VMs (xcp_vm_*)
  • (optionally) storage repositories

Benefits

  • enables filtering and scoping in external monitoring systems
  • reduces noise by allowing selective discovery
  • aligns with common Prometheus/OpenMetrics practices
  • no breaking change (additional label only)

Example use cases

  • monitor only resources tagged production
  • separate customers in MSP environments
  • exclude lab/test systems from monitoring

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions