Comments (8)
That's a good question! I would have expected that command to error out instead. Where you have Nginx HTTP Connections
would normally be a panel number, e.g. 4
.
User> hubot graf db nginx-lua:4
It's a bit annoying that you have to guess what the Panel ID is for the graph you want on a larger Dashboard, but the parser currently doesn't know how to de-reference the panel you want from a name. I'm guessing the image rendering endpoint couldn't find what it wanted, so it defaulted to returning an image of the home page for the Grafana instance.
from hubot-grafana.
Reference for getting panels: https://github.com/stephenyeargin/hubot-grafana#retrieve-specific-panels
from hubot-grafana.
That's a good question! I would have expected that command to error out instead. Where you have
Nginx HTTP Connections
would normally be a panel number, e.g.4
.User> hubot graf db nginx-lua:4
It's a bit annoying that you have to guess what the Panel ID is for the graph you want on a larger Dashboard, but the parser currently doesn't know how to de-reference the panel you want from a name. I'm guessing the image rendering endpoint couldn't find what it wanted, so it defaulted to returning an image of the home page for the Grafana instance.
First of all, thank you very much for your answers. I tried the following commands again, all returned to the grafana homepage
hubot graf db nginx-lua: Nginx Lua panel-1
graf db nginx-lua:1
graf db nginx-lua: Nginx Lua
graf db nginx-lua: Nginx Lua panel-1
.....
Is there any way? What information do I need to provide?
from hubot-grafana.
So of the commands you provided, this is the only one I'd expect to work:
graf db nginx-lua:1
The slug for the dashboard nginx-lua
is the only part needed (the "Nginx Lua" is a descriptive name, but the API doesn't understand those). The panel ID 1
is only needed if you don't want to render the entire dashboard (e.g. if you only wanted to return one of the graphs. Posting graf db nginx-lua
without the :1
should return all of the panels. I still don't know why Grafana is returning the home page, but I'd suspect it's adding extra parameters it doesn't need to.
The first error you see there might be related to this issue where you'd need to increase the concurrent rendering limit if the server can support it (may run out of CPU or memory if it's too high).
One thing to double check is to go to an individual panel, click on "Share" in the context menu and then click "Direct link rendered image. This will help diagnose if there's any trouble with the image rendering function in Grafana itself.
from hubot-grafana.
So of the commands you provided, this is the only one I'd expect to work:
graf db nginx-lua:1
The slug for the dashboard
nginx-lua
is the only part needed (the "Nginx Lua" is a descriptive name, but the API doesn't understand those). The panel ID1
is only needed if you don't want to render the entire dashboard (e.g. if you only wanted to return one of the graphs. Postinggraf db nginx-lua
without the:1
should return all of the panels. I still don't know why Grafana is returning the home page, but I'd suspect it's adding extra parameters it doesn't need to.The first error you see there might be related to this issue where you'd need to increase the concurrent rendering limit if the server can support it (may run out of CPU or memory if it's too high).
One thing to double check is to go to an individual panel, click on "Share" in the context menu and then click "Direct link rendered image. This will help diagnose if there's any trouble with the image rendering function in Grafana itself.
from hubot-grafana.
I want to try again. This is the debug log.
'nginx-lua:1',
undefined,
index: 0,
input: 'yangroupaomo graf db nginx-lua:1',
groups: undefined ]
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG nginx-lua
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG { from: 'now-6h', to: 'now' }
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG []
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG 1
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG false
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG false
[Mon Aug 03 2020 09:37:16 GMT+0800 (China Standard Time)] DEBUG { aliasColors:
{ reading: 'semi-dark-red',
waiting: 'semi-dark-green',
writing: 'semi-dark-orange' },
bars: false,
dashLength: 10,
dashes: false,
fill: 1,
gridPos: { h: 8, w: 12, x: 0, y: 0 },
id: 6,
legend:
{ alignAsTable: false,
avg: false,
current: false,
max: false,
min: false,
rightSide: false,
show: true,
total: false,
values: false },
lines: true,
linewidth: 1,
l
spaceLength: 10,
stack: false,
steppedLine: false,
targets:
[ { expr:
'histogram_quantile(0.5, rate(nginx_http_request_duration_seconds_bucket{instance="$server", host="$host"}[1m]))',
format: 'time_series',
intervalFactor: 1,
legendFormat: '50th percentile',
refId: 'D' },
{ expr:
'histogram_quantile(0.75, rate(nginx_http_request_duration_seconds_bucket{instance="$server", host="$host"}[1m]))',
format: 'time_series',
hide: false,
intervalFactor: 1,
legendFormat: '75th percentile',
refId: 'A' },
{ expr:
'histogram_quantile(0.95, rate(nginx_http_request_duration_seconds_bucket{instance="$server", host="$host"}[1m]))',
format: 'time_series',
hide: false,
intervalFactor: 1,
timeFrom: null,
timeRegions: [],
timeShift: null,
title: 'Requests by Status - $host',
tooltip: { shared: true, sort: 0, value_type: 'individual' },
type: 'graph',
xaxis:
{ buckets: null, mode: 'time', name: null, show: true, values: [] },
yaxes:
[ { format: 'short',
label: null,
logBase: 1,
max: null,
min: null,
show: true },
{ format: 'short',
label: null,
logBase: 1,
max: null,
min: null,
show: true } ],
yaxis: { align: false, alignLevel: null } }
[Mon Aug 03 2020 09:37:19 GMT+0800 (China Standard Time)] DEBUG Uploading file: 16788 bytes, content-type[image/png]
[Mon Aug 03 2020 09:37:22 GMT+0800 (China Standard Time)] DEBUG Received file_shared message from: undefined, file_id: F0183R53213
[Mon Aug 03 2020 09:37:22 GMT+0800 (China Standard Time)] DEBUG No listeners executed; falling back to catch-all
from hubot-grafana.
I don't see anything obvious from the debug log. Is there not a "Direct link rendered image" button on the "Share" panel? If that button isn't there, it might indicate your Grafana server hasn't been configured for rendering the PNG images necessary for this Hubot package to work.
There is some documentation on things to check to ensure your instance meets the requirements.
from hubot-grafana.
I gave up, thanks
from hubot-grafana.
Related Issues (20)
- 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
- Slack upload fails with `TypeError: this.robot.adapter.client.web.files.uploadV2 is not a function`
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.