2.6 KiB
title | description | menu | weight | v2.0/tags | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Use InfluxDB templates | Use the `influx pkg` command to view and install templates from your local filesystem or from URLs. |
|
101 |
|
Use the influx pkg
command to summarize, validate, and install templates from
your local filesystem and from URLs.
View a template summary
To view a summary of what's included in a template before installing the template,
use the influx pkg summary
command.
Summarize templates stored in your local filesystem or from a URL.
{{% code-tabs-wrapper %}} {{% code-tabs %}} From a file From a URL {{% /code-tabs %}} {{% code-tab-content %}}
# Syntax
influx pkg summary -f <template-filepath>
# Example
influx pkg summary -f /path/to/template.yml
{{% /code-tab-content %}} {{% code-tab-content %}}
# Syntax
influx pkg summary -u <template-url>
# Example
influx pkg summary -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml
{{% /code-tab-content %}} {{% /code-tabs-wrapper %}}
Validate a template
To validate a template before installing it or for troubleshooting purposes, use
the influx pkg validate
command.
Validate templates stored in your local filesystem or from a URL.
{{% code-tabs-wrapper %}} {{% code-tabs %}} From a file From a URL {{% /code-tabs %}} {{% code-tab-content %}}
# Syntax
influx pkg validate -f <template-filepath>
# Example
influx pkg validate -f /path/to/template.yml
{{% /code-tab-content %}} {{% code-tab-content %}}
# Syntax
influx pkg validate -u <template-url>
# Example
influx pkg validate -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml
{{% /code-tab-content %}} {{% /code-tabs-wrapper %}}
Install templates
Install templates from files
- Install individual files
- Install mulitple files
- Install all files in a directory
- Recurse through a directory -
-recurse
Install templates from a URL
# Syntax
influx pkg -u <template-url>
# Example
influx pkg -u <template-url>
Install templates from both files and URLs
# Syntax
influx pkg -u <template-url> -f <template-path>
# Example
influx pkg \
-u https://mydomain.com/templates/template1.yml \
-u https://mydomain.com/templates/template2.yml \
-f ~/templates/custom-template.yml \
-f ~/templates/iot/home/ \
--recurse