Comments (5)
@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:
- exact match
-> if no match found - regex match on
url
element for relevant piece
-> if no match found - last ditch search to match on exact title (e.g.
Application_Load_Balancers
)
-> if no match found - return error
from hubot-grafana.
Our version of Grafana is Grafana v7.5.5 (b5190ee547)
from hubot-grafana.
🤔 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.
@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.
@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)
- ERROR SyntaxError: Unexpected token < in JSON at position 0 HOT 3
- graf db nginx-lua Why is the grafana homepage returned? HOT 8
- TimeZone support HOT 2
- Grafana 7: Full screen leads to localhost:3000 redirect HOT 4
- ERROR SyntaxError: Unexpected token < in JSON at position 0 HOT 3
- hubot-grafana does not work for Grafana 8 HOT 7
- Can only receive 1 image by each query which queries all panels in the dashboard HOT 2
- Allow the bot to respond in a thread HOT 2
- S3 Region breaks existing setup HOT 2
- Support for @hubot-friends/hubot-slack
- feat: clean the NPM package to make its footprint smaller
- Getting rid of the obsolete request dependency
- Tests are too slow or timing out HOT 2
- Refactor platform specific actions to adapters? HOT 3
- Download method needs API key in header HOT 3
- [Windows] Unable to run `npm test` HOT 4
- Let's do some big refactoring
- Typings
- Bot will respond multiple times when Grafana is a bit slow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubot-grafana.