Altinity / Altinity/clickhouse-operator

Service and ServiceMonitor target unused exporter port (8888)

Open
#1,831 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.6k
Forks
574
Avg merge
8d 6h
Merged PRs (30d)
6

Description

The operator's ServiceMonitor configuration targets two ports (ch-metrics:8888 and op-metrics:9999), but the operator pod only exposes port 9999 if exporter is disabled

ServiceMonitor:

spec:
  endpoints:
    - interval: 30s
      port: ch-metrics
    - interval: 30s
      port: op-metrics

same for the Service:

ports:
    - name: ch-metrics
      port: 8888
      protocol: TCP
      targetPort: 8888
    - name: op-metrics
      port: 9999
      protocol: TCP
      targetPort: 9999

Expected Behavior:
The ServiceMonitor should only target the actively used operator metrics port (9999)

also there are those 2 log line on operator startup:
log 1: start serving metrics at: :9999/metrics
log 2: 2025-09-29T13:05:50Z INFO controller-runtime.metrics Metrics server is starting to listen {"addr": ":8080"}

is there a reason 8080 is not scraped?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ServiceMonitor and Service configurations shown in the issue, then compare their target ports with the operator startup logs. Verify which metrics endpoints are exposed and scraped; done means the configuration targets only active ports and the role of port 8080 is documented or resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, prometheus
Domain
devops, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.