Link to the graph

I constracted singlestat for showing cpu load for one server in a current time.
I have added a link to the graph(on a separate dashboard) for showing the history(lines) of cpu load.
On this graph will be history of cpu load for all servers.
When I click on the link on the singlestat, I want to see graph with the history only for cpu load of the server that was discribed on the singlestat.
Is it possible?

Hi,

You’ll need to define a template variable in the dashboard that you want to link to. If you define one variable named host you can browse that specific host of the dashboard using a querystring parameter, i.e. http://<link to dashboard>?var_host=host1. For this to work you’ll need to create proper queries in the dashboard for your panels so that they’ll filter on the $host variable.

Marcus

Thank for the answer, but I don’t understand how to do it right know.

  1. I try to add a new variable to the dashboard I want to pass to. Should I add a query right in the dashboard or in the panel?
  2. How my panel in this dashboard understand the value of the server? When I click on the panel in one dashboard and pass to another dasboard. How it understands what server calls it?
    From http://docs.grafana.org/reference/templating/#templating I didn’t understand how to implement it. May explain in more details?

Hi,

Please see this example dashboard. It’s using graphite as data source. Don’t know what data source you’re using but should be similar. You can see the queries if you edit a panel that it’s using the template variables. If I change some values in drop downs you’ll notice that the url changes and you can use for example this url to pre-populate template value selection by url: http://play.grafana.org/d/000000143/templating?orgId=1&var-app=fakesite&var-server=web_server_01&var-interval=1h

In your singlestat panel you’ll need to extract an identifier or similar from the one server with highest cpu load and use that value to construct your drill down link to your other dashboard.

Marcus