Documentation

Create a variable

This page documents an earlier version of InfluxDB. InfluxDB v2.6 is the latest stable version. View this page in the v2.6 documentation.

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

There are multiple variable types that provide different means of populating your list of variable values. For information about variable types, see Variable types.

Variable name restrictions

Variable names must begin with a letter or underscore (_).

The following names cannot be used as dashboard variables because they are reserved keywords in Flux: and, import, not, return, option, test, empty, in, or, package, and builtin.

Create a variable in the Data Explorer

InfluxData recommends using the Data Explorer to create Query dashboard variables. The Table visualization type and View Raw Data option to provide human-readable query results.

  1. Click the Data Explorer icon in the sidebar.

  2. Use the Query Builder or Script Editor to build a query.

  3. Use the Table visualization type or enable the View Raw Data option to view human-readable query results.

  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.

For information about common Query variables, see Common variable queries.

Create a variable in the Settings section

  1. Click the Settings icon in the navigation bar.

  2. Select the Variables tab.

  3. Enter a name for your variable.

  4. Select your variable type. For details on each type, see Variable types.

  5. Enter the appropriate variable information.

  6. Click Create.

Import a variable

InfluxDB lets you import variables exported from InfluxDB in JSON format.

  1. Click the Settings icon in the navigation bar.

  2. Select the Variables tab.

  3. Click the Create Variable drop-down menu and select Import Variable.

  4. In the window that appears:

  • Select Upload File to drag and drop or select a file.
  • Select Paste JSON to paste in JSON.
  1. Click Import JSON as Variable.

Was this page helpful?

Thank you for your feedback!


Set your InfluxDB URL

Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.

InfluxDB Cloud backed by InfluxDB IOx

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by IOx, this is the correct documentation.

If powered by TSM, see the TSM-based InfluxDB Cloud documentation.

InfluxDB Cloud backed by InfluxDB TSM

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine which enables nearly unlimited series cardinality and SQL query support. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by TSM, this is the correct documentation.

If powered by IOx, see the IOx-based InfluxDB Cloud documentation.

State of the InfluxDB Cloud (IOx) documentation

The new documentation for InfluxDB Cloud backed by InfluxDB IOx is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.