influx template

  • influx CLI 2.0.1+
  • InfluxDB 2.0.1+

The influx template command summarizes the specified InfluxDB template. The command returns information about all resources included in the template.

Usage

  1. influx template [flags]
  2. influx template [command]

Subcommands

SubcommandDescription
validateValidate a template

Flags

FlagDescriptionInput TypeMaps to ?
—disable-colorDisable color in output
—disable-table-bordersDisable table borders
-e—encodingTemplate encoding (yaml,yml,json, or jsonnet)string
-f—filePath to template file (supports HTTP(S) URLs or file paths)stringArray
-h—helpHelp for the template command
—jsonOutput data as JSON (default false)INFLUX_OUTPUT_JSON
-R—recurseRecurse through files in the directory specified in -f, —file

Examples

Authentication credentials

The examples below assume your InfluxDB host, organization, and token are provided by the active influx CLI configuration. If you do not have a CLI configuration set up, use the appropriate flags to provide these required credentials.

Summarize InfluxDB Templates:

Summarize an InfluxDB template from a local file
  1. influx template --file /path/to/template.yml
Summarize InfluxDB templates from multiple files
  1. influx template \
  2. --file /path/to/template1.yml \
  3. --file /path/to/template2.yml
Summarize an InfluxDB template from a URL
  1. influx template --file https://example.com/path/to/template.yml
Summarize all InfluxDB templates in a directory
  1. influx template \
  2. --file /path/to/template/dir/ \
  3. --recurse
Specify the encoding of the InfluxDB template to summarize
  1. influx template \
  2. --file /path/to/template \
  3. --encoding json

templates