Skip to content

Listener pods are not emitting metrics #4178

Open
@brandshaide

Description

@brandshaide

Checks

Controller Version

most recent version

Deployment Method

Helm

Checks

  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes

To Reproduce

1. Enable `metrics` for `controller/listener` pods in `values` like this: 


metrics:
  controllerManagerAddr: ":8080"
  listenerAddr: ":8080"
  listenerEndpoint: "/metrics"

2. Have a `PodMonitor` or `ServiceMonitor` in place
3. Release via `Helm`

Describe the bug

  1. Enable metrics for controller and listener pods as described in values

the docs are referring to metrics as emitted by controller (which is working just fine) and listener pods:

Once these properties are configured, your controller-manager and listener pods emit metrics via the listenerEndpoint bound to the ports that you specify in your values.yaml file.

Those are my PodMonitor definitions, one for controller (emitting metrics) and one for listener (not emitting metrics such as gha_busy_runners :

apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: arc-controller-metrics
spec:
  namespaceSelector:
    matchNames:
      - cicd-github
  selector:
    matchLabels:
      app.kubernetes.io/component: controller-manager
  podMetricsEndpoints:
    - port: metrics
      path: /metrics
      interval: 30s
      scheme: http
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: arc-listener-metrics
spec:
  namespaceSelector:
    matchNames:
      - cicd-github
  selector:
    matchLabels:
      app.kubernetes.io/component: runner-scale-set-listener
  podMetricsEndpoints:
    - port: metrics
      path: /metrics
      interval: 30s
      scheme: http

From what I can see in the Deployment of the controller, only the controller pod is configured to have metrics port, but this is only for the controller/manage pods

Shouldn't there also be a similiar definition for the listener in the Deployment for being able to emit metrics?

Describe the expected behavior

listener Pods emit metrics as specified in official docs

Additional Context

....
watchSingleNamespace: "true"
  flags:
    logLevel: "info"
    logFormat: "json"

  metrics:
    controllerManagerAddr: ":8080"
    listenerAddr: ":8080"
    listenerEndpoint: "/metrics"

  replicaCount: 2

Controller Logs

https://gist.github.com/brandshaide/7a4e5493993ea5bd160a5c36de3e8f42

Runner Pod Logs

https://gist.github.com/brandshaide/c51b076e588069ab191099fbdd60c384

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggha-runner-scale-setRelated to the gha-runner-scale-set modeneeds triageRequires review from the maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions