Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Prometheus plugin] Issue with Prometheus Alert #1689

Open
hoanglecao opened this issue Oct 22, 2024 · 0 comments
Open

[Prometheus plugin] Issue with Prometheus Alert #1689

hoanglecao opened this issue Oct 22, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@hoanglecao
Copy link

Hi Team,

I am using the Prometheus plugin to integrate Backstage with Prometheus and I am encountering an 'Unexpected token' issue

Current Behavior

When configuring Prometheus with a cloud-hosted instance using proxy settings, I encountered the following error when viewing Prometheus Alerts: Unexpected token 'd', 'demopromet' is not valid JSON

Steps to Reproduce

   // app-config.yaml
proxy:
  endpoints:
    '/prometheus/api':
      target: ${PROMETHEUS_URL}
      credentials: dangerously-allow-unauthenticated // I am using it to avoid the 401 Unauthorized error, which I had previously posted about here: https://github.com/RoadieHQ/roadie-backstage-plugins/issues/1680
      headers:
        Authorization: Basic ${PROMETHEUS_TOKEN}
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  annotations:
    prometheus.io/rule: 'demoprometheus'
    prometheus.io/alert: "demoprometheus-01"

I am trying to debug and found that the issue occurs when executing the API below

image

I am not sure what I am missing or if I have misconfigured something. Any suggestions or ideas would be greatly appreciated.

My Environment

  • "@backstage/plugin-catalog-react": "workspace:^",
  • `"@backstage/integration-react": "workspace:^":
  • "@roadiehq/backstage-plugin-prometheus": "^2.11.3",
@hoanglecao hoanglecao added the kind/bug Something isn't working label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant