InfluxDB Docs

Create a variable

Create dashboard variables in the Data Explorer, from the Organization page, or import a variable. Variable names must be unique.

For information about variable types, see Variable types.

Create a variable in the Data Explorer

Only Query variables can be created from the Data Explorer.

  1. Click the Data Explorer icon in the sidebar.

  2. Click Script Editor on the lower right.

  3. Build the query for your variable using the Table visualization type or enable the View Raw Data option.

  4. Click Save As in the upper right.

  5. In the window that appears, select Variable.

  6. Enter a name for your variable in the Name field.

  7. Click Create.

Create a variable in the configuration page

  1. Click the Settings icon in the navigation bar.

  2. Select the Variables tab.

  3. Click +Create Variable.

  4. Enter a name for your variable.

  5. Select your variable type.

  6. Enter the appropriate variable information.

  7. Click Create.

Import a variable

  1. Click the Organizations icon in the navigation bar.

  2. Select an organization from the list.

  3. Select the Variables tab.

  4. Click the +Create Variable dropdown menu and select Import Variable.

  5. In the window that appears:

    • Select Upload File to drag-and-drop or select a file.
    • Select Paste JSON to paste in JSON.
  6. Select an organization from the Destination Organization dropdown.

  7. Click Import JSON as Variable.