#401 unauthorized RoadieHQ/backstage-plugin-prometheus

2 messages · Page 1 of 1 (latest)

celest steeple
#

Hey, I'm trying to set up my prometheus FE plugin for RoadieHQ , but I'm getting 401 Unauthorized in response .

I think it's a configuration issue, because when pasting the URL in directly, I don't have any issues querying the enpoint. I don't use any token, I can access prom /api/v1 directly from browser.

  1. I've followed the guide for app-config.yaml and set up the proxy
proxy:
  endpoints:
    ...
    '/prometheus/api':
      # url to the api and path of your hosted prometheus instance
      target: https://prometheus.aks-xxx/api/v1/
      changeOrigin: true
      #secure: false
      #headers:
        #Authorization:

prometheus:
  # url to the api and path of your hosted prometheus instance
  uiUrl: https://prometheus.aks-xxx
  proxyPath: /prometheus/api
  1. When I load the page it tries to query
    http://localhost:7007/api/proxy/prometheus/api/query_range?query=maxMemoryUsage&start=1723016057.601&end=1723019657.601&step=14
    And this returns

"error": {
"name": "AuthenticationError",
"message": "Missing credentials",
"stack": "AuthenticationError: Missing credentials\n at DefaultHttpAuthService.credentials httpAuthServiceFactory.ts:150:13

celest steeple