backstage-plugin-grafana icon indicating copy to clipboard operation
backstage-plugin-grafana copied to clipboard

Grafana Plugin not finding tags when using Grafana Cloud?

Open proffalken opened this issue 2 years ago • 2 comments

Hello, me again! :)

I've been trying to import the alerts from Grafana using the plugin, but for some reason it can't find them when I'm using Grafana Cloud.

I've followed the instructions, and my catalog-info.yaml looks like this:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: Mventory
  description: The inventory backend for Makerspaces
  annotations:
    grafana/tag-selector: "mventory"
spec:
  type: service
  owner: [email protected]
  lifecycle: production
  providesApis:
    - mventory-api
---
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
  name: mventory-api
  description: The MVentory API
spec:
  type: internal
  lifecycle: production
  owner: [email protected]
  definition: "The MVentory API"

The challenge I'm having is that in Grafana Cloud it uses the new Grafana Alerts platform and you can't tag an alert, you can only tag a dashboard.

I've tagged the dashboard as appropriate, but the alerts are still not showing up:

image

image

I'm also struggling to work out how to debug a plugin within Backstage, so I can't really provide you with any relevant log entries because they just come back as the equivalent of "successful, no data was found".

proffalken avatar Mar 25 '22 09:03 proffalken

Hey!

I haven't played much with the new alerting setup in recent Grafana versions (still using v8.2 at work), but I would suspect that the API endpoint used by this plugin (/api/alerts?dashboardTag=lala) is only meant to be used for the previous alerting system, not the new one.

K-Phoen avatar Apr 07 '22 23:04 K-Phoen

Ah, ok, thanks, that's a common thing we're finding with the new alerts, the Terraform provider isn't able to talk to them either!

proffalken avatar Apr 08 '22 08:04 proffalken