Skip to content

Service monitor checks wrong port name #9968

Open
@rataja

Description

@rataja

What happened?

Kubernetes dashboard 7.10.4

Servicemonitor by default checks port name https and cannot be changed via values.yaml

Port name https by default belongs to service kubernetes-dashboard-metrics-scraper which doesnt return any metrics and that is problem for prometheus.

Test commands for returned values from each service

curl -I   kubernetes-dashboard-api:8000/metrics
curl -I   kubernetes-dashboard-auth:8000/metrics
curl -I   kubernetes-dashboard-kong-proxy:80/metrics
curl -I   kubernetes-dashboard-metrics-scraper:8000/metrics
curl -I   kubernetes-dashboard-web:8000/metrics

What did you expect to happen?

Servicemonitor port to be scraped should be configurable or by default should be either name: kong-proxy or name: auth

In this case it will return metrics and prometheus will be "happy"

How can we reproduce it (as minimally and precisely as possible)?

1st step
Install helm chart with values.yaml edited

  serviceMonitor:
    # Whether to create a Prometheus Operator service monitor.
    enabled: true

2nd step:
Prometheus application -> Target health
Result: Error scraping target: strconv.ParseFloat: parsing "/metrics": invalid syntax while parsing: "URL: /metrics"

Anything else we need to know?

No response

What browsers are you seeing the problem on?

No response

Kubernetes Dashboard version

7.10.4

Kubernetes version

1.31.4

Dev environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions