rfmoz / grafana-dashboards

Grafana dashboards
Apache License 2.0
1.1k stars 438 forks source link

support for multiple hosts (per dashboard) #124

Closed calestyo closed 11 months ago

calestyo commented 1 year ago

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:

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?

Any thoughts?

Thanks, Chris.

calestyo commented 1 year ago

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.