Instead of hard-coding specific information (such as node names or resource IDs) in a panel, Helm has several ways to create more dynamic and interactive dashboards:

Using Template Variables to Create Dynamic Dashboards

Template variables are available in metric queries and panel titles and appear as a drop-down list at the top of the dashboard. Select from the list to change the data the panel displays.

Variable Drop

There are two queries you can customize:

  • specific node(s): nodeFilter(NODEFILTERSTRING)

  • specific resource(s) on a node: nodeResources(NODEID)

This procedure explains how to use variables in a query for a category of nodes (switches).

  1. Select or create a panel. For this procedure, we created a panel that displays active TCP connections:

    TCP
  2. In the top right of the panel, click the dashboard settings icon and choose Variables>Add variable.

  3. Specify the appropriate information, similar to the following. A preview of the values returned appears at the bottom of the screen:

    Variable
    1. Supported queries are in the form nodeFilter($filter) or nodeResource(FS:FID) where $filter is any filter expression. In this case, we used the nodeFilter variable to specify the nodes in the category "switches".

  4. Click Add.

  5. Click Save.

Specify a Node Variable in the Panel

After creating the template variable, you need to update the panel to make sure data is available from all the nodes rather than a specific one, as originally configured.

  1. In the panel, type $node in the Node field.

  2. Update the label to make it unique by typing the following: nodeToLabel($node).

    1. A label must be unique to display data in the panel.

      Node final
  3. Save your dashboard.

  4. Click the Node drop-down you created to select the nodes whose data you want to display:

    Node Select