Giter Site home page Giter Site logo

Comments (5)

stephenyeargin avatar stephenyeargin commented on September 23, 2024 1

@KeesCBakker Oh that's clever! I wouldn't have thought to hijack the Hubot message envelope to re-format the request.

I do like the idea of leveraging the search function to try and help the user find the dashboard they are looking for (without remembering or even knowing the generated slug). I'd think that it would be some order of:

  1. exact match
    -> if no match found
  2. regex match on url element for relevant piece
    -> if no match found
  3. last ditch search to match on exact title (e.g. Application_Load_Balancers)
    -> if no match found
  4. return error

from hubot-grafana.

KeesCBakker avatar KeesCBakker commented on September 23, 2024

Our version of Grafana is Grafana v7.5.5 (b5190ee547)

from hubot-grafana.

KeesCBakker avatar KeesCBakker commented on September 23, 2024

🤔 Looking into: https://github.com/stephenyeargin/hubot-grafana/releases/tag/v3.0.0

This version drops support for Grafana 5 or earlier, and has only been tested with Grafana 8. It also relies exclusively on the uid of the dashboard rather than the legacy slug. If you run into trouble with this version and are running an earlier version of Grafana, we suggest downgrading back to v2.5.2.
We also recommend the hubot-alias package if the new UID keys are too cumbersome to remember. In the example below, the uid is 7h3u1d, and we're requesting the second panel.

from hubot-grafana.

stephenyeargin avatar stephenyeargin commented on September 23, 2024

@KeesCBakker Sorry for the delay. Yes, that was a tradeoff in #139 that seemed to be the best route forward. I don't like having to use a separate package because the UID's are difficult to keep up with (and the API doesn't have a way to map those requests), but we did not have a better idea at the time.

from hubot-grafana.

KeesCBakker avatar KeesCBakker commented on September 23, 2024

@stephenyeargin, we ended up parsing the URI to see if we could have our slugs back and it worked. We wrote some middleware for Hubot to rewrite messages that did not have the UID in them. What do you think of the approach?

Did a small write up on the topic: https://keestalkstech.com/2022/11/grafana-i-want-slugs-back-for-my-hubot-%f0%9f%98%ad/

from hubot-grafana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.