Unable to scrape metrics using Victoriametrics VMServiceScrape

Hello,

Our Grafana setup utilizes VictoriaMetrics, a Prometheus-compatible system. I’m currently attempting to scrape the metrics exposed on /service/metrics/prometheus, but encountering login issues resulting in a 500 error. Below, you’ll find the configuration for the vmservicescrape component I’m using, along with the documentation I’ve referenced. Your prompt assistance would be greatly appreciated. Thank you.
https://help.sonatype.com/en/support-features.html

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
  name: nexus-metrics
  namespace: nexus
spec:
  endpoints:
    - interval: 5s
      basicAuth:
        password:
          key: *******
        username:
          key: developer
      vm_scrape_params:
        proxy_client_config:
          basic_auth:
            password:
              key: ******
            username:
              key: developer
      path: /service/metrics/prometheus
      port: nexus
      scheme: http
  jobLabel: nxrm
  namespaceSelector:
    matchNames:
      - nexus
  selector: 
    matchLabels:
      app: nexus

Is the 500 error from Nexus? If so, is there a stack trace?

I suppose the authentication process isn’t functioning properly. Consequently, logging in isn’t possible, and the metrics aren’t being displayed. Is there an alternative method we can use for logging in, such as using a bearer token?


2024-04-01 09:58:40,687+0000 WARN [qtp1390597909-12173]
*UNKNOWN org.sonatype.nexus.siesta.internal.AuthorizationExceptionMapper - (ID 3bda03ab-2b9c-4868-ac59-2bccf498cdde) Response: [403] (no entity/body); mapped from: org.apache.shiro.authz.UnauthenticatedException: This subject is anonymous - it does not have any identifying principals and authorization operations require an identity to check against. A Subject instance will acquire these identifying principals automatically after a successful login is performed be executing org.apache.shiro.subject.Subject.login(AuthenticationToken) or when 'Remember Me' functionality is enabled by the SecurityManager. This exception can also occur when a previously logged-in Subject has logged out which makes it anonymous again. Because an identity is currently not known due to any of these conditions, authorization is denied

That message is unlikely to cause a 500 error, in fact it specifically calls out a 403.

I have sorted it out Thanks! You can close the issue