# Metrics renamed in client-python

> The Prometheus metrics of OpenCTI connectors renamed in client-python for OpenCTI 6.8, old name to new name, and the two variables that set their prefix.

- URL: https://filigran.io/docs/lts/7.260309-lts/deploy/upgrade/breaking-changes/opencti/6-8-client-python-metrics/
- Products: OpenCTI 7.260309.0-lts.8
- OpenCTI line: 7.260309 LTS · 7.260309.0-lts.8
- For: platform engineers, developers
- Type: Reference

With OpenCTI 6.8, the Prometheus metrics that connectors expose through the Python client library (client-python) follow the [Prometheus naming practices](https://prometheus.io/docs/practices/naming/). This page lists the renamed metrics, so you can update the dashboards and alerts that use them, for example in Grafana.

**Diagram: From OpenCTI 6.8, connectors expose their Prometheus metrics under new names, with an optional prefix, so the dashboards and alerts that read them need the new names**

- Connector: Namespace and subsystem (CONNECTOR_METRICS_NAMESPACE and CONNECTOR_METRICS_SUBSYSTEM, empty by default), client-python (For OpenCTI 6.8)
- Prometheus: Renamed metrics (bundle_send becomes bundles_sent_total, run_count becomes runs_total)
- Your monitoring: Dashboards and alerts (Grafana, recording rules)

Connections:

- Namespace and subsystem → client-python: optional prefix
- client-python → Renamed metrics: exposes
- Renamed metrics → Dashboards and alerts: update the names

| | Version |
| --- | --- |
| Changed in | OpenCTI 6.8 |

## Renamed metrics {#renamed-metrics}

| Old name | New name |
| --- | --- |
| `bundle_send` | `bundles_sent_total` |
| `record_send` | `records_sent_total` |
| `run_count` | `runs_total` |
| `ping_api_count` | `ping_api_total` |
| `ping_api_error` | `ping_api_errors_total` |
| `error_count` | `errors_total` |
| `client_error_count` | `client_errors_total` |

The `state` metric keeps its name.

## Namespace and subsystem {#namespace-and-subsystem}

Two new settings add a prefix to the metric names, as Prometheus builds them: `<namespace>_<subsystem>_<name>`. Both are empty by default.

| Environment variable | Configuration key |
| --- | --- |
| `CONNECTOR_METRICS_NAMESPACE` | `connector.metrics_namespace` |
| `CONNECTOR_METRICS_SUBSYSTEM` | `connector.metrics_subsystem` |

## What to do {#what-to-do}

Replace the old names in your dashboards, alerts and recording rules. If you set a namespace or a subsystem, add the prefix they create.

## What's next {#what-s-next}

- [Observability metrics](https://filigran.io/docs/lts/7.260309-lts/deploy/operate/metrics/), to collect the metrics of the stack.
- [Breaking changes](https://filigran.io/docs/lts/7.260309-lts/deploy/upgrade/breaking-changes/), the other changes per version.
