Coralogix Operator Metrics
The Coralogix Operator exposes a set of metrics that provide visibility into its internal state and performance. These include both standard operator metrics provided by controller-runtime, and custom metrics implemented by the Coralogix Operator.
Custom Metrics
Name | Type | Description | Labels |
---|---|---|---|
cx_operator_build_info | Gauge | Coralogix Operator build information. | go_version , operator_version , coralogix_url |
cx_operator_resource_info | Gauge | Coralogix Operator custom resource information. | kind , name , namespace , status |
cx_operator_client_requests_total | Counter | Total number of Coralogix Operator's in-cluster requests by status code and verb. | code , verb |
cx_operator_client_requests_latency_seconds | Histogram | Histogram of latencies for the Coralogix Operator's in-cluster requests by verb and url. | verb , url |
Accessing the Metrics
Metrics are exposed via the operator’s /metrics
endpoint, which by default is served on port 8080.
To access them locally:
Then, open your browser to http://localhost:8080/metrics
.
Sending Metrics to Coralogix
The operator's metrics can be sent to Coralogix using Prometheus Operator. This requires configuring Prometheus to both scrape the operator's metrics and forward them to Coralogix.
Scraping the Metrics with Prometheus
By default, the Coralogix Operator is deployed with:
- A ServiceMonitor that instructs Prometheus to scrape the operator's metrics endpoint.
- A ClusterRole that grants access to read the metrics.
To ensure proper scraping:
- Verify that Prometheus is configured to select the provided
ServiceMonitor
. - Ensure that the
ClusterRole
is bound to Prometheus'sServiceAccount
so it has the necessary permissions (using aClusterRoleBinding
).
Forwarding the Metrics to Coralogix
To forward the collected metrics to Coralogix, follow this guide to configure Prometheus accordingly.