rfmoz / grafana-dashboards

Grafana dashboards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for multiple hosts (per dashboard)

calestyo opened this issue · comments

Hey.

I wondered whether your awesome Node Exporter Full dashboard could get some support for displaying data from multiple hosts (in one dashboard).

Right now, AFAIU, it always displays "only" all the metrics for one given node.

Previously I've used Ganglia, which - in addition to that - allows to show one single panel (with a set of somehow related metrics like network in/out or maybe really just one single metric value), but that for multiple hosts.

In addition it also has "overall" panels, like when you have a group of hosts, e.g. storage servers, and display for each of them the network IO, you also get an overall view with the accumulated network IO of all these nodes.

Such views are nice for spotting certain types of problems.

Now I can imagine that you probably don't want to integrate this into your dashboard, which probably wouldn't work well.

But maybe it could be possible to simplify my use case at least.

What I did so far was the following:

  • created a new dashboard
  • "copied" the node and job variables from yours and changed node to be multi value
  • copied one of the panels from yours into the new dashboard, e.g. "Network Traffic Basic"
  • changed that one panel to repeat over he node variable
  • added another copy of your panel (with no repetition) and changed the graph to use stacking (so I get the summary for all selected nodes)

This alone doesn't work yet, I also need to modify all your queries where instance="$node" to use =~ rather than =. That seems to be required by PromQL to get regexp matching, which in turn seems to be needed for the multi values.

Seems to work quite nice, at least for simple cases.

Main concern is that I'd like to track your changes without much effort.

Now I wondered whether anything could be done, to make re-use of your panels simpler?

  • First idea was, whether you could simply use =~ in your queries. It seems to work, but not sure whether it really does in all cases cause for you non-multi-value node var, Grafana might not escape it, and so it may actually be taken as regexp in your case.

  • Not sure whether something could be done with library panels (I'm really new to grafana ^^)?
    I kind of hoped that your panels could be made e.g. library panels... and that the dashboard could contain some hidden variable or so that tells the panel whether it should use repetition (over node) or not (and so your dashboard could set that simply to the normal case, while "mine" could set it to the special case. But no idea whether something like this can be even done in Grafana.

Any thoughts?

Thanks,
Chris.

Oh and if something like the "hidden var" would be possible.. it could perhaps also be used to select the panel title, which for your case would of course be still e.g. "Network Traffic Basic", but in my case would need to be the hostname.