Operator observability
The MCS operator exposes Prometheus metrics for the control loop and the
ClickHouse and Keeper resources it manages. In CoreWeave clusters, VMAgent
discovers the operator VMPodScrape, writes the samples to VictoriaMetrics,
and vmalert evaluates the platform alert rules.
Enable collection
metrics:
enable: true
secure: false
port: 8080
victoriaMetrics:
enable: true
interval: 30s
scrapeTimeout: 2s
The metrics endpoint is cluster-internal HTTP by default, matching the
VMPodScrape pattern used by Polaris and the existing data-platform operators.
Set metrics.secure: true only when the cluster requires authenticated HTTPS;
the operator VMPodScrape then supplies the Kubernetes service-account token
and TLS configuration automatically.
The chart also creates a VMPodScrape for every managed ClickHouse Writer and
ElasticQuery Pod. ClickHouse exposes its native Prometheus endpoint on port
9363, including current metrics, events, and asynchronous metrics.
Signals
Controller-runtime provides reconciliation, workqueue, API client, process,
and Go runtime metrics. MCS adds resource-state metrics under the
cwmcs_operator namespace:
cwmcs_operator_resource_collection_successcwmcs_operator_mcsservice_infocwmcs_operator_mcsservice_phasecwmcs_operator_mcsservice_conditioncwmcs_operator_mcsservice_generationcwmcs_operator_mcsservice_observed_generationcwmcs_operator_mcsservice_clickhouse_replicas_desiredcwmcs_operator_mcsservice_elasticquery_replicas_desiredcwmcs_operator_mcskeeper_infocwmcs_operator_mcskeeper_phasecwmcs_operator_mcskeeper_conditioncwmcs_operator_mcskeeper_generationcwmcs_operator_mcskeeper_observed_generationcwmcs_operator_mcskeeper_instances_desiredcwmcs_operator_mcskeeper_instances_readycwmcs_operator_mcskeeper_quorum_available
Resource metrics are rebuilt from the controller-runtime cache on every scrape. A process restart or custom-resource deletion therefore cannot leave a stale in-memory gauge behind. Labels contain Kubernetes resource identities and bounded status values; they do not contain user email addresses, request IDs, condition messages, or secrets.
The operator emits one structured JSON log object per line in production. Use
cluster, namespace, controller, and resource identity fields to correlate
logs with metrics. Never log credentials or object-storage secrets.
First response
Operator unavailable or metrics target down
- Check the
mcs-operator-controller-managerDeployment and pod events indata-mcs-operator. - Check the manager container logs and
/healthzand/readyzprobes. - For a scrape failure, check the
VMPodScrapeand metrics Pod endpoint endpoints. Whenmetrics.secureis enabled, also check TLS configuration and token review/subject access review permissions.
Reconcile errors or stale observed generation
- Inspect
controller_runtime_reconcile_errors_totalbycontroller. - Inspect the affected custom resource status and conditions.
- Check manager logs for the same namespace and resource name.
- Confirm dependent Secrets, storage endpoints, and Kubernetes resources are present before retrying or changing desired state.
MCSService degraded
- Inspect the MCSService conditions and events.
- Check ClickHouse writer and ElasticQuery pod readiness and logs.
- Check Keeper health before restarting a writer.
- Check storage credentials and endpoint connectivity.
Keeper quorum unavailable
- Compare
cwmcs_operator_mcskeeper_instances_readywithcwmcs_operator_mcskeeper_instances_desired. - Inspect Keeper pods, events, and logs.
- Check object-storage credentials and connectivity.
- Restore a majority of members before restarting dependent ClickHouse writers.
Dashboard
observability/grafana/mcs-operator-dashboard.yaml contains an importable
Grafana dashboard. Select the regional VictoriaMetrics and Loki data sources,
then filter by region, zone, and cluster. Publish a validated revision through
the managed Grafana dashboard workflow.