Manage the Prometheus OpenStack Exporter

About this task

The prometheus-openstack-exporter is deployed by default with the stx-openstack application in StarlingX OpenStack. After you apply the stx-openstack application, the exporter activates and makes Nova, Neutron, Glance, Cinder, Heat, Keystone, and Placement resource metrics available through a Prometheus HTTP endpoint.

Metrics Endpoint

The exporter publishes metrics at:

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

To verify the endpoint is reachable and returning data:

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

For the complete list of available metrics, see GitHub.

Disable the Exporter

To disable the exporter while keeping the chart deployed, set the replica count to zero and reapply the application.

~(keystone_admin)$ system helm-override-update stx-openstack prometheus-openstack-exporter openstack     --set pod.replicas.prometheus_openstack_exporter=0 --reuse-values
~(keystone_admin)$ system application-apply stx-openstack

To completely disable the chart so that it is no longer rendered or deployed, set the chart enabled attribute to false:

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

Re-enable the Exporter

To re-enable the exporter after it has been disabled by setting the replica count to zero:

~(keystone_admin)$ system helm-override-update stx-openstack prometheus-openstack-exporter openstack     --set pod.replicas.prometheus_openstack_exporter=1 --reuse-values
~(keystone_admin)$ system application-apply stx-openstack

To re-enable the chart after it has been fully disabled:

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

Configure Polling Parameters

The exporter polls OpenStack service APIs at a configurable interval. The default values are:

  • OS_POLLING_INTERVAL: 30 seconds between polls

  • TIMEOUT_SECONDS: 20 seconds per API call

  • OS_RETRIES: 1 retry on failure

To change these values, create an overrides file and apply it.

Procedure

  1. Create the overrides file.

    cat << EOF > exporter-polling-overrides.yaml
    conf:
      prometheus_openstack_exporter:
        OS_POLLING_INTERVAL: 60
        TIMEOUT_SECONDS: 30
        OS_RETRIES: 3
    EOF
    
  2. Apply the overrides.

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

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

For the complete list of configurable values, see values.yaml.

Note

After the initial application, some exporter metrics may be unavailable for up to an hour while OpenStack service endpoints are being registered. The exporter recovers automatically following a token refresh. If you need immediate recovery, delete the exporter pod:

~(keystone_admin)$ kubectl delete pod -n openstack -l application=prometheus-openstack-exporter

This does not affect reapplies or upgrades.