Skip to content

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

NameTypeDescriptionLabels
cx_operator_build_infoGaugeCoralogix Operator build information.go_version, operator_version, coralogix_url
cx_operator_resource_infoGaugeCoralogix Operator custom resource information.kind, name, namespace, status
cx_operator_client_requests_totalCounterTotal number of Coralogix Operator's in-cluster requests by status code and verb.code, verb
cx_operator_client_requests_latency_secondsHistogramHistogram 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:

kubectl port-forward -n <operator-namespace> svc/coralogix-operator 8080:8080

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's ServiceAccount so it has the necessary permissions (using a ClusterRoleBinding).

Forwarding the Metrics to Coralogix

To forward the collected metrics to Coralogix, follow this guide to configure Prometheus accordingly.