Configure OpenStack Exporter for Metrics Collection

The OpenStack Exporter provides metrics from OpenStack services in a format that can be used by Prometheus-compatible monitoring tools.

The exporter collects resource and inventory information from OpenStack services, including Nova, Neutron, Glance, Cinder, Heat, Keystone, and Placement. Examples include metrics related to instances, hypervisors, networks, ports, floating IP addresses, images, volumes, stacks, and service status.

Note

The OpenStack Exporter is not enabled by default. When the StarlingX OpenStack application is first applied, the exporter and its associated metrics service are not deployed. To collect and expose OpenStack metrics, enable the exporter and reapply the application. See Enable the OpenStack Exporter.

The StarlingX OpenStack application also includes the Ceilometer Central Exporter and the Ceilometer Compute Exporter. The platform prometheus application collects metrics from the Ceilometer exporters. Metrics exposed by the OpenStack Exporter are intended for external monitoring systems and are not available for metric-based Aodh alarms.

OpenStack Exporter Metrics Endpoint

The OpenStack Exporter exposes metrics in Prometheus format through the /metrics endpoint on port 9180:

http://openstack-metrics.openstack.svc.cluster.local:9180/metrics

The metrics endpoint can be accessed by applications and monitoring systems that have network connectivity to the openstack-metrics service.

To verify that the endpoint is reachable and returning metrics:

curl -s http://openstack-metrics.openstack.svc.cluster.local:9180/metrics | head -20

The metrics available at this endpoint depend on the installed version of the OpenStack Exporter. The version included in this release is 1.7.0.

Enable the OpenStack Exporter

By default, the OpenStack Exporter is disabled. Enable the exporter when you want to expose cloud-wide OpenStack metrics for consumption by external monitoring systems.

To enable the OpenStack Exporter, set the chart enabled attribute to true and reapply the OpenStack application:

~(keystone_admin)]$ system helm-chart-attribute-modify stx-openstack prometheus-openstack-exporter openstack --enabled true
~(keystone_admin)]$ system application-apply stx-openstack

After the application is reapplied, the exporter begins collecting metrics from OpenStack services and exposes them through the openstack-metrics service described in Metrics Endpoint.

Verify that the exporter pod and service are running:

$ kubectl -n openstack get pod,svc -l application=prometheus-openstack-exporter

Configure OpenStack Exporter Polling Parameters

The OpenStack Exporter periodically queries OpenStack services to collect metrics. The following parameters control how frequently metrics are collected and how API requests are handled.

Configuration Parameter

Default

Description

conf.prometheus_openstack_exporter.OS_POLLING_INTERVAL

30

Time, in seconds, between metric collection cycles.

conf.prometheus_openstack_exporter.TIMEOUT_SECONDS

20

Timeout, in seconds, for API requests.

conf.prometheus_openstack_exporter.OS_RETRIES

1

Number of retry attempts for failed API requests.

Note

Reducing the polling interval increases the number of API requests sent to OpenStack services and may increase control-plane load.

To modify the polling parameters, create a Helm override file and reapply the OpenStack application.

Procedure

  1. Create an overrides file.

    cat <<EOF > openstack-exporter-polling.yaml
    conf:
      prometheus_openstack_exporter:
        OS_POLLING_INTERVAL: 60
        TIMEOUT_SECONDS: 20
        OS_RETRIES: 1
    EOF
    
  2. Apply the override.

    ~(keystone_admin)]$ system helm-override-update stx-openstack prometheus-openstack-exporter openstack --reuse-values --values openstack-exporter-polling.yaml
  3. Reapply the OpenStack application.

    ~(keystone_admin)]$ system application-apply stx-openstack

For the complete list of configurable chart values, see the upstream OpenStack-Helm reference: prometheus-openstack-exporter values.yaml.

OpenStack Exporter Metric Reference

For a complete list of supported metrics, refer to the upstream OpenStack Exporter documentation:

OpenStack Exporter metrics

OpenStack Exporter Metrics Consumers

As described in the Metrics Framework (Metrics Framework), the OpenStack Exporter follows a different metrics pipeline than the Ceilometer Central Exporter and Ceilometer Compute Exporter. OpenStack Exporter metrics are intended for external monitoring systems and are not used by the platform Prometheus server or Aodh metric-based alarms.

Important

OpenStack Exporter metrics cannot be used for Aodh metric-based alarms (--type prometheus).

To use OpenStack Exporter metrics, configure an external monitoring system to collect metrics directly from the openstack-metrics:9180 endpoint.

OpenStack Exporter Security Considerations

The OpenStack Exporter exposes metrics through the /metrics endpoint on port 9180 using HTTP. The endpoint is intended for internal cluster communication and is not protected by authentication or TLS.

Any application or monitoring system with network access to the openstack-metrics service in the openstack namespace can retrieve the exported metrics.

The OpenStack Exporter collects metrics using administrative access to OpenStack services. As a result, the exported metrics provide a cloud-wide view of resources and services across all projects, including instances, networks, volumes, images, and stacks.

Note

The openstack-metrics service should be considered the access boundary for these metrics. Limit access to authorized monitoring systems and apply appropriate controls before exposing, forwarding, or storing the metrics outside the cluster.

Disable the OpenStack Exporter

To disable the OpenStack Exporter, set the chart enabled attribute to false and reapply the OpenStack application:

~(keystone_admin)]$ system helm-chart-attribute-modify stx-openstack prometheus-openstack-exporter openstack --enabled false
~(keystone_admin)]$ system application-apply stx-openstack

After the application is reapplied, the OpenStack Exporter is removed and no longer collects or exposes OpenStack metrics. The openstack-metrics service is also removed and the metrics endpoint is no longer available.

Note

Disabling the OpenStack Exporter stops metric collection for external monitoring systems that consume metrics from the openstack-metrics service.

Troubleshooting the OpenStack Exporter

The following table lists common issues and recommended actions for the OpenStack Exporter.

Symptom

Verify

Resolution

Metrics for some OpenStack services are missing immediately after the OpenStack Exporter is enabled.

Verify that the exporter pod is running:

kubectl -n openstack get pod -l application=prometheus-openstack-exporter

This behavior can occur immediately after the exporter is first enabled. Some metrics may not become available until the exporter completes its initial Keystone authentication and service endpoint discovery.

If immediate recovery is required, restart the exporter pod:

kubectl delete pod -n openstack -l application=prometheus-openstack-exporter

The OpenStack Exporter pod or metrics service is not present.

Verify that the exporter resources exist:

kubectl -n openstack get pod,svc -l application=prometheus-openstack-exporter

If the OpenStack Exporter chart is disabled, no pod or metrics service is deployed.

Enable the OpenStack Exporter and reapply the application. For more information, see Enable the OpenStack Exporter.

Connections to the metrics endpoint on port 9180 are refused.

Verify that the exporter pod is running:

kubectl -n openstack get pod -l application=prometheus-openstack-exporter

If the service exists but no exporter pod is running, check the pod status and Kubernetes events to determine why the workload failed to start:

kubectl -n openstack describe pod -l application=prometheus-openstack-exporter

kubectl -n openstack get events --sort-by='.lastTimestamp'

OpenStack Exporter metrics do not appear in Prometheus.

Not applicable.

This behavior is expected. The platform prometheus application does not collect metrics from the OpenStack Exporter.

OpenStack Exporter metrics must be collected directly by an external monitoring system.

An Aodh --type prometheus alarm based on an OpenStack Exporter metric remains in the insufficient data state.

Not applicable.

This behavior is expected. OpenStack Exporter metrics are not stored in the Prometheus TSDB.

Use Ceilometer metrics when creating metric-based alarms.

Metrics from one OpenStack service are missing, while metrics from other services are available.

Verify that the service API is healthy and that its endpoint is registered:

openstack endpoint list

Metrics are collected independently for each service. A problem affecting a particular service API impacts only that service’s metrics.

If the service API is healthy but responds slowly, consider increasing TIMEOUT_SECONDS or OS_RETRIES.

Changes to the polling interval have no effect.

Verify that the OpenStack application was reapplied after the configuration change:

system application-show stx-openstack

Updating the override alone does not apply the change.

Reapply the OpenStack application:

system application-apply stx-openstack