Comments (12)
See #67. If anyone has a moment, I'd love a 👍 after testing.
from hubot-grafana.
dashboard.rows seems to be missing ?...
from hubot-grafana.
@mfilotto It looks like there were some breaking changes in v5 we're not ready for. This has happened in previous versions, so I need to better understand what changed.
hubot-grafana/src/grafana.coffee
Lines 141 to 150 in fb6d23d
from hubot-grafana.
I've got a similar issue, Grafana 5.0.0 as well, hubot-grafana 1.8.0. graf list command is working, graf db not. This is the output when trying to db graf db foo:
Error Stacktrace:
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'length' of undefined
hubot_1 | at /home/hubot/node_modules/hubot-grafana/src/grafana.coffee:167:7
hubot_1 | at /home/hubot/node_modules/hubot-grafana/src/grafana.coffee:314:14
hubot_1 | at IncomingMessage. (/home/hubot/node_modules/hubot/node_modules/scoped-http-client/src/index.js:95:22)
hubot_1 | at emitNone (events.js:72:20)
hubot_1 | at IncomingMessage.emit (events.js:166:7)
hubot_1 | at endReadableNT (_stream_readable.js:923:12)
hubot_1 | at nextTickCallbackWith2Args (node.js:511:9)
hubot_1 | at process._tickCallback (node.js:425:17)
Debug output with dashboard object:
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG Executing listener callback for Message 'b graf db foo'
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG [ 'b graf db foo',
hubot_1 | 'foo',
hubot_1 | undefined,
hubot_1 | index: 0,
hubot_1 | input: 'b graf db foo' ]
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG foo
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG { from: 'now-6h', to: 'now' }
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG []
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG false
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG false
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG false
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG { meta:
hubot_1 | { type: 'db',
hubot_1 | canSave: true,
hubot_1 | canEdit: true,
hubot_1 | canAdmin: false,
hubot_1 | canStar: true,
hubot_1 | slug: 'foo',
hubot_1 | url: '/d/CtkEB7gmz/foo',
hubot_1 | expires: '0001-01-01T00:00:00Z',
hubot_1 | created: '2018-03-08T13:22:22Z',
hubot_1 | updated: '2018-03-08T13:22:49Z',
hubot_1 | updatedBy: 'admin',
hubot_1 | createdBy: 'admin',
hubot_1 | version: 3,
hubot_1 | hasAcl: false,
hubot_1 | isFolder: false,
hubot_1 | folderId: 0,
hubot_1 | folderTitle: 'General',
hubot_1 | folderUrl: '' },
hubot_1 | dashboard:
hubot_1 | { annotations: { list: [Object] },
hubot_1 | editable: true,
hubot_1 | gnetId: null,
hubot_1 | graphTooltip: 0,
hubot_1 | id: 2,
hubot_1 | links: [],
hubot_1 | panels: [ [Object] ],
hubot_1 | schemaVersion: 16,
hubot_1 | style: 'dark',
hubot_1 | tags: [],
hubot_1 | templating: { list: [] },
hubot_1 | time: { from: 'now-6h', to: 'now' },
hubot_1 | timepicker: { refresh_intervals: [Object], time_options: [Object] },
hubot_1 | timezone: '',
hubot_1 | title: 'foo',
hubot_1 | uid: 'CtkEB7gmz',
hubot_1 | version: 3 } }
hubot_1 | [Thu Mar 08 2018 13:23:24 GMT+0000 (UTC)] DEBUG []
Fun Fact: The Grafana HTTP API doc has the rows property in all example dashboard objects, also for v5.0: http://docs.grafana.org/http_api/dashboard/#get-dashboard-by-uid (haven't debugged this further, don't what endpoint you're calling.
If you need help for debugging / testing, please let me know.
from hubot-grafana.
Looping in @torkelo to see if he has any insight into what might have changed in v5.0.
from hubot-grafana.
This change (under 5.0.0-beta1) may be related:
https://github.com/grafana/grafana/blob/master/CHANGELOG.md#http-api
from hubot-grafana.
Search by slug is deprecated and will be remove, search by uid should be used instead.
http://docs.grafana.org/http_api/dashboard/#deprecated-resources
Another impact : graf list
displays dbs and folders, so the search should be filtered by type data-db
http://docs.grafana.org/http_api/folder_dashboard_search/
from hubot-grafana.
So the question will become how to maintain functionality for both<= v4
and v5
.
from hubot-grafana.
Tested this, works for my Grafana 5 instance. Many thanks 👍
from hubot-grafana.
@mfilotto I've knocked out two of the items you've highlighted, but the deprecated bit can be tackled in a new Issue/PR since the current functionality isn't broken per se, but will be in the future. Going to send out a release this morning with #67 in it.
from hubot-grafana.
Released with v2.0.0
.
from hubot-grafana.
It's working just fine 👍
Thanks @stephenyeargin
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
- Upgrade from 2.5.2 to 3.0.1: dashboards can't be accessed by slug anymore HOT 5
- 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.