Code Monkey home page Code Monkey logo

Comments (8)

stephenyeargin avatar stephenyeargin commented on August 16, 2024

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.

stephenyeargin avatar stephenyeargin commented on August 16, 2024

Reference for getting panels: https://github.com/stephenyeargin/hubot-grafana#retrieve-specific-panels

from hubot-grafana.

fsckzy avatar fsckzy commented on August 16, 2024

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
.....

image
image

Is there any way? What information do I need to provide?

from hubot-grafana.

stephenyeargin avatar stephenyeargin commented on August 16, 2024

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.

Screen Shot 2020-08-01 at 4 11 03 PM

Screen Shot 2020-08-01 at 4 11 10 PM

from hubot-grafana.

fsckzy avatar fsckzy commented on August 16, 2024

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.

Screen Shot 2020-08-01 at 4 11 03 PM

Screen Shot 2020-08-01 at 4 11 10 PM

image

from hubot-grafana.

fsckzy avatar fsckzy commented on August 16, 2024

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.

stephenyeargin avatar stephenyeargin commented on August 16, 2024

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.

fsckzy avatar fsckzy commented on August 16, 2024

I gave up, thanks

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.