Initialize an InfluxDB stack

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

InfluxDB automatically creates a new stack each time you apply an InfluxDB template without providing a stack ID. To manually create or initialize a new stack, use the influx stacks init command.

Initialize a stack when applying a template

To automatically create a new stack when applying an InfluxDB template don’t provide a stack ID. InfluxDB applies the resources in the template to a new stack and provides the stack ID the output.

  1. influx apply \
  2. -o example-org \
  3. -f path/to/template.yml

Manually initialize a new stack

Use the influx stacks init command to create or initialize a new InfluxDB stack.

Provide the following:

  • Organization name or ID
  • Stack name
  • Stack description
  • InfluxDB template URLs
  1. # Syntax
  2. influx stacks init \
  3. -o <org-name> \
  4. -n <stack-name> \
  5. -d <stack-description \
  6. -u <package-url>
  7. # Example
  8. influx stacks init \
  9. -o example-org \
  10. -n "Example Stack" \
  11. -d "InfluxDB stack for monitoring some awesome stuff" \
  12. -u https://example.com/template-1.yml \
  13. -u https://example.com/template-2.yml