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

Allow getting data from multiple tags

Open ivangonzalezacuna opened this issue 2 years ago • 3 comments

With this feature, now it's possible to fetch the alerts and dashboards for multiple tags.

This feature was also needed in our company, and it was rather simple to implement.

The idea is just adding a list of tags separated by commas. So instead of my-tag, now you can use my-tag-1,my-tag-2, and the API will make 2 requests to fetch all the information for both tags. Finally, I'm executing an extra check to remove duplicates, as a dashboard could have multiple tags and be fetched multiple times.

This change is small and should be easy to review, but if you need more data, please don't hesitate asking.

ivangonzalezacuna avatar Jul 08 '22 07:07 ivangonzalezacuna

Applied the requested changes. I added a new parameter to the dashboard, so the ID is also stored in there and the filtering can be performed.

ivangonzalezacuna avatar Jul 08 '22 08:07 ivangonzalezacuna

Hey @K-Phoen , any update on this? We need this feature and the other I created so we can integrate the plugin in our project :)

ivangonzalezacuna avatar Jul 21 '22 07:07 ivangonzalezacuna

Sorry to ping again @K-Phoen, could you have a look at this MR? We'd really like to switch back to this plugin again, so far we have to use a fork.

heyLu avatar Aug 23 '22 07:08 heyLu

@K-Phoen @dweber019 @jmfrancois Any way to review this, our organization could use the same feature :)

arnouthoebreckx avatar Jan 11 '23 12:01 arnouthoebreckx

Hi @K-Phoen , I have updated the PR to have the latest changes from the main branch. I have also simplified a bit how to do it. I tested it locally and it's working fine for both clients.

It would be great if this gets merged, then we could use this plugin instead our forked version, because we need the multiple-tag-approach for our use-case.

ivangonzalezacuna avatar Jan 30 '23 08:01 ivangonzalezacuna

@K-Phoen Possible to get a review on this?

arnouthoebreckx avatar Feb 03 '23 13:02 arnouthoebreckx

Not to step on anyone's toes, but I've also forked K-Phoen's repo and implemented my own version of this that supports several logical operators and doesn't require an additional annotation.

jobosk avatar Mar 08 '23 12:03 jobosk

This should be addressed by #63 :)

K-Phoen avatar Mar 14 '23 23:03 K-Phoen