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

hubot-grafana does not work for Grafana 8 #138

Closed
superbrothers opened this issue Jul 7, 2021 · 7 comments · Fixed by #139
Closed

hubot-grafana does not work for Grafana 8 #138

superbrothers opened this issue Jul 7, 2021 · 7 comments · Fixed by #139

Comments

@superbrothers
Copy link
Contributor

In Grafana 8, GET /dashboards/db/:slug has been removed. hubot-grafana has used that API endpoint, so it does not work for Grafana 8 😢

# Call the API to get information about this dashboard
callGrafana endpoint, "dashboards/db/#{slug}", (dashboard) ->
robot.logger.debug dashboard

@imyuliz
Copy link

imyuliz commented Jul 8, 2021

me too,

@imyuliz
Copy link

imyuliz commented Jul 8, 2021

slug deprecated in Grafana v5.0,
https://grafana.com/docs/grafana/latest/http_api/dashboard/

What should we do

@superbrothers
Copy link
Contributor Author

I have created a patch to support Grafana 8. This patch may not be compatible with older Grafana, so it will be difficult to merge this in.

@stephenyeargin
Copy link
Owner

stephenyeargin commented Jul 9, 2021

/cc #68

So with this change, what should the user interaction expectation be for working with a specific dashboard? Can we no longer have a command that shorthands it out to !graf db my-great-dashboard instead of !graf db d3adbe3f?

@stephenyeargin
Copy link
Owner

stephenyeargin commented Jul 9, 2021

Reviewing the search API, I don't see a way to guarantee that we always return a single dashboard if we were to try and transform an existing user-friendly URI. It seems like a lot to ask for folks to learn a nine-character, case-sensitive UID to pull up their dashboard.

I see a handful of ways forward:

  1. Declare that this Hubot package supports only Grafana 7.x and below, effectively sun-setting this project (I don't like this option)
  2. Release v3.0.0 that merges @superbrothers's branch with instructions for users of < 8 to remain on the 2.x release
  3. Add an environment variable that enables Grafana 8 support (switch statement on how to query/return data). This allows folks to opt-in, but requires a manual step.
  4. Continue seeing if there's a way to handle the changes "under the hood" using the Search API in an attempt mitigate changes in user space

/cc @torkelo if you'd like to weigh in.

@stephenyeargin stephenyeargin pinned this issue Jul 9, 2021
@superbrothers
Copy link
Contributor Author

superbrothers commented Jul 10, 2021

  1. Release v3.0.0 that merges @superbrothers branch with instructions for users of < 8 to remain on the 2.x release

I think this is the better way.

@stephenyeargin
Copy link
Owner

Making a note that the test coverage is rather extensive for this package. I started the process of updating it, but it will take a few sessions to get it all done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants