The OpenTelemetry Collector, when configured with a Prometheus receiver, provides an integration with Ceph to scrape Prometheus metrics. The Collector uses the Prometheus Receiver to fetch metrics from the configured path in the Ceph configuration file. From there, the metrics are processed and exported to Cloud Observability.
To complete the integration, you will:
You need to configure Ceph to use the Prometheus exporter.
1 sudo ceph mgr module enable prometheus
1 docker exec mon1 ceph --cluster ceph mgr module enable prometheus
1 2 $ sudo ceph config set mgr mgr/prometheus/server_addr 0.0.0.0 $ sudo ceph config set mgr mgr/prometheus/server_port 9283
By default the module will accept HTTP requests on port 9283 on all IPv4 and IPv6 addresses on the host
For more details about using Ceph with the Prometheus exporter, see the official Ceph documentation.
In the Collector configuration file, configure the Prometheus receiver to use the Ceph Prometheus endpoint as a scrape target.
1 2 3 4 5 6 7 8 9 receivers: prometheus: config: scrape_configs: - job_name: 'ceph-mgr' scrape_interval: 15s metrics_path: '/metrics' static_configs: - targets: ['localhost:9283']
The OpenTelemetry repo’s README provides additional details about Prometheus receiver configuration.
More details about the Prometheus scrape configuration can be found here.
Once the Ceph receiver is configured, enable it by adding it to one or more pipelines as described in the Collector configuration documentation.
You can validate that metrics are reporting to Cloud Observability on the Metrics details page in Project settings.
In Cloud Observability, click Project settings > Metric details.
Search for Ceph metric names.
See Ceph documentation for a complete list of emitted metrics.
If needed, click on the metric to edit the description and how the units are displayed in Cloud Observability.
Use the Cloud Observability Terraform Provider to create a dashboard for the metrics.
For a more complete example that’s ready to run, see the Ceph integration in Cloud Observability OpenTelemetry Examples.
Updated Dec 1, 2022