> For the complete documentation index, see [llms.txt](https://docs.cennso.com/cennso/monitoring/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/cennso/monitoring/latest.md).

# Monitoring Extension

Monitoring Extension is a Cennso extension that enables exporting selected Prometheus metrics from a Cennso platform to an Elasticsearch cluster. It provides the `Exporter` custom resource, which you use to configure individual export pipelines. Each pipeline polls a PromQL-compatible endpoint on a fixed schedule and POSTs an NDJSON stream of ECS-compliant JSON documents to an ingest gateway.

## Functionality

Each `Exporter` Custom Resource (CR) declares one independent export pipeline, called a **Monitoring Exporter**. A pipeline reads metrics from a PromQL-compatible source on a fixed schedule and writes them to an Elasticsearch cluster as ECS-compliant JSON documents. You can run many pipelines side by side, each with its own source, schedule, and set of metrics.

For the underlying Kubernetes resources and the reconciliation flow, see the [Architecture](https://docs.cennso.com/cennso/monitoring/latest/architecture.md) page.

## Key features

- Per-pipeline declarative configuration through the `Exporter` Custom Resource.
- Stock Telegraf deployment managed by a Crossplane composition. One pod per CR, no shared state.
- PromQL range queries against any Prometheus-compatible source: Prometheus or Grafana Mimir.
- Outputs **ECS-compliant JSON** documents directly to Elasticsearch. Kubernetes resource labels are mapped to the correct ECS fieldsets (`orchestrator.*`, `container.name`, `host.name`, `service.name`). The discriminated `sink` field reserves space for future sink types.
- OAuth 2.0 client-credentials token management with automatic refresh through Telegraf's `secretstores.oauth2` plugin.

## Use cases

- **[Export metrics to Elasticsearch](https://docs.cennso.com/cennso/monitoring/latest/guides/export-to-elastic.md)** — forward selected PromQL metrics to an Elasticsearch cluster as ECS-compliant JSON documents, ready to explore in Kibana.
