Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not rendering all repeating graphs based on dashboard template variable #53

Open
dachenbach opened this issue Jan 13, 2017 · 2 comments

Comments

@dachenbach
Copy link

I'm not sure if this is a bug with this script or somewhere in Grafana. I have a dashboard set up with a template variable for server service type and then another template variable for server name (list built from service type variable). The server variable is a multi-select type and defaults to "All". Graphs for each server are then created by repeating rows (as opposed to repeating graphs)

When I pass the "service" variable via the script, no more than 2 graphs are rendered. Here's an example:

graph db system:cpu service=example

If that service contains three servers, I only get graphs from the first two servers. There are no errors in either the hubot or grafana logs, and the grafana log indicates that only two graphs were rendered:

t=2017-01-13T17:53:29+0000 lvl=info msg=Rendering logger=png-renderer path="dashboard-solo/db/system?panelId=9&width=1000&height=500&from=now-6h&to=now&var-service=example"
t=2017-01-13T17:53:29+0000 lvl=info msg=Rendering logger=png-renderer path="dashboard-solo/db/system?panelId=12&width=1000&height=500&from=now-6h&to=now&var-service=example"

@stephenyeargin
Copy link
Owner

I don't have a Grafana install to connect at the moment (changed jobs), so can this be recreated using play.grafana.org?

A few theories:

  • Timeout happening before graph is rendered
  • The matching on service needs adjusting

Do you have the HUBOT_LOG_LEVEL cranked up to debug by chance?

@dachenbach
Copy link
Author

I considered it being a timeout issue, but it seems strange that it would always limit at 2. As for the matching service, it works perfectly in the grafana UI, and nothing seems amiss other than it just not rendering more than 2 images.

Unfortunately, I don't see how I could test this in play.grafana.org without the ability to create an API key.

That said, with debug logging enabled, I can confirm that it only sees the repeating panels twice. Just grepping through the output for the panel titles:

Jan 18 18:39:06 grafana hubot: title: 'System',
Jan 18 18:39:06 grafana hubot: title: 'CPU Usage % - $server',
Jan 18 18:39:06 grafana hubot: title: 'System load - $server',
Jan 18 18:39:06 grafana hubot: title: 'Memory Usage % - $server',
Jan 18 18:39:06 grafana hubot: title: 'CPU Usage % - $server',
Jan 18 18:39:06 grafana hubot: title: 'System load - $server',
Jan 18 18:39:06 grafana hubot: title: 'Memory Usage % - $server',
Jan 18 18:39:06 grafana hubot: title: 'Network Average Bytes In',
Jan 18 18:39:06 grafana hubot: title: 'Network Average Bytes Out',
Jan 18 18:39:06 grafana hubot: title: 'Disk Max Used (MB)',
Jan 18 18:39:06 grafana hubot: title: 'Disk Max Used %',
Jan 18 18:39:06 grafana hubot: title: 'Disk IO Average Time (ms)',
Jan 18 18:39:06 grafana hubot: title: 'Disk Average Read Bytes',
Jan 18 18:39:06 grafana hubot: title: 'Disk Average Write Bytes',
Jan 18 18:39:06 grafana hubot: title: 'Status Check Failed (Instance)',
Jan 18 18:39:06 grafana hubot: title: 'Status Check Failed (System)',
Jan 18 18:39:06 grafana hubot: title: 'CPU Credit Balance',

"CPU Usage", "System load", and "Memory Usage" should repeat three more times (total of five each). So I'm guessing that means this is a grafana problem and not a hubot-grafana bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants