PodMonitor with prometheus metric is DROPPED

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube Community Edition v10.3
  • how is SonarQube deployed: Helm
  • what are you trying to achieve : collect prometheus metrics
  • what have you tried so far to achieve this :
    ** I followed the logs in order to deploy a podMonitor ( it runs in same names space as sonarqube)
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: sonarqube
spec:
  namespaceSelector:
    matchNames:
      - rct-sonarqube
  podMetricsEndpoints:
    - interval: 30s
      path: /
      scheme: http
      targetPort: monitoring-ce
    - interval: 30s
      path: /
      scheme: http
      targetPort: monitoring-web
  selector:
    matchLabels:
      app: sonarqube

When I check it in prometheus the service is Dropped

Hey there.

Can you please update to SonarQube v10.5? v10.3 is no longer an active version of SonarQube, and I know we’ve made some improvements here ([SONAR-20723] - Jira)

Thanks Colin,

It works with 10.3 . I just had to provide the jar file from an internal url as we blocked access to internet.