chore(telegraf): Update and improve Telegraf install instructions
- Updates Telegraf install instructions, adds more info to promote verifying downloads. - Adds setup for tests. - Makes tests pass in install and configuration docs. - Adds Vale.sh exception to allow duration values inside code blocks. - Adds Dockerfiles for convenience to test install procedures in CentOS and Ubuntu. - Clarifies and fixes config file handling and specifying input and output plugins.pull/5577/head
parent
7c9ae0f486
commit
df39d7cd86
|
@ -1,14 +1,12 @@
|
||||||
FROM registry.gitlab.com/pipeline-components/remark-lint:latest
|
FROM registry.gitlab.com/pipeline-components/remark-lint:latest
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
# Generic
|
|
||||||
#RUN apk add --no-cache
|
#RUN apk add --no-cache
|
||||||
COPY /.ci/remark-lint /app/
|
COPY /.ci/remark-lint /app/
|
||||||
|
|
||||||
# Node
|
# Node
|
||||||
ENV PATH "$PATH:/app/node_modules/.bin/"
|
ENV PATH="$PATH:/app/node_modules/.bin/"
|
||||||
RUN yarn install && yarn cache clean
|
RUN yarn install && yarn cache clean
|
||||||
ENV NODE_PATH=/app/node_modules/
|
ENV NODE_PATH=/app/node_modules/
|
||||||
RUN ln -nfs /app/node_modules /node_modules
|
RUN ln -nfs /app/node_modules /node_modules
|
||||||
|
@ -23,3 +21,6 @@ LABEL \
|
||||||
org.label-schema.name="Remark-lint" \
|
org.label-schema.name="Remark-lint" \
|
||||||
org.label-schema.schema-version="1.0" \
|
org.label-schema.schema-version="1.0" \
|
||||||
org.label-schema.url="https://pipeline-components.gitlab.io/"
|
org.label-schema.url="https://pipeline-components.gitlab.io/"
|
||||||
|
|
||||||
|
ENTRYPOINT [ "remark" ]
|
||||||
|
CMD [ "" ]
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
import remarkPresetLintConsistent from 'remark-preset-lint-consistent';
|
||||||
|
import remarkPresetLintRecommended from 'remark-preset-lint-recommended';
|
||||||
|
import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide';
|
||||||
|
import remarkFrontmatter from 'remark-frontmatter';
|
||||||
|
import remarkFrontmatterSchema from 'remark-lint-frontmatter-schema';
|
||||||
|
import remarkNoShellDollars from 'remark-lint-no-shell-dollars';
|
||||||
|
import remarkToc from 'remark-toc';
|
||||||
|
|
||||||
|
const remarkConfig = {
|
||||||
|
settings: {
|
||||||
|
bullet: '-',
|
||||||
|
plugins: [
|
||||||
|
remarkPresetLintConsistent,
|
||||||
|
remarkPresetLintRecommended,
|
||||||
|
remarkPresetLintMarkdownStyleGuide,
|
||||||
|
remarkFrontmatter,
|
||||||
|
remarkFrontmatterSchema,
|
||||||
|
remarkNoShellDollars,
|
||||||
|
// Generate a table of contents in `## Contents`
|
||||||
|
[remarkToc, { heading: '' }],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default remarkConfig;
|
|
@ -5,5 +5,5 @@ nonword: true
|
||||||
level: error
|
level: error
|
||||||
tokens:
|
tokens:
|
||||||
- \b\d+(?:B|kB|MB|GB|TB)
|
- \b\d+(?:B|kB|MB|GB|TB)
|
||||||
# Ignore duration literals in code blocks.
|
# Match time units, but not duration literals inside code blocks.
|
||||||
- \b(?!\`)\d+(?:ns|ms|s|min|h|d)
|
- \b`(\n)?\d+(ns|ms|s|min|h|d)`\b
|
||||||
|
|
|
@ -12,6 +12,7 @@ RUN echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] h
|
||||||
|
|
||||||
# Install InfluxDB clients to use in tests.
|
# Install InfluxDB clients to use in tests.
|
||||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||||
|
apt-utils \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
gpg \
|
gpg \
|
||||||
|
@ -70,6 +71,7 @@ RUN service influxdb start
|
||||||
|
|
||||||
# Copy test scripts and make them executable.
|
# Copy test scripts and make them executable.
|
||||||
COPY --chmod=755 ./test/scripts/parse_yaml.sh /usr/local/bin/parse_yaml
|
COPY --chmod=755 ./test/scripts/parse_yaml.sh /usr/local/bin/parse_yaml
|
||||||
|
COPY --chmod=755 ./test/scripts/get-container-info.sh /usr/local/bin/get-container-info
|
||||||
|
|
||||||
ENTRYPOINT [ "pytest" ]
|
ENTRYPOINT [ "pytest" ]
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ services:
|
||||||
- local
|
- local
|
||||||
- lint
|
- lint
|
||||||
cloud-pytest:
|
cloud-pytest:
|
||||||
|
container_name: cloud-pytest
|
||||||
image: influxdata/docs-pytest
|
image: influxdata/docs-pytest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -85,6 +86,7 @@ services:
|
||||||
target: /app/content
|
target: /app/content
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
cloud-dedicated-pytest:
|
cloud-dedicated-pytest:
|
||||||
|
container_name: cloud-dedicated-pytest
|
||||||
image: influxdata/docs-pytest
|
image: influxdata/docs-pytest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -139,6 +141,7 @@ services:
|
||||||
target: /app/content
|
target: /app/content
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
cloud-serverless-pytest:
|
cloud-serverless-pytest:
|
||||||
|
container_name: cloud-serverless-pytest
|
||||||
image: influxdata/docs-pytest
|
image: influxdata/docs-pytest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -188,6 +191,7 @@ services:
|
||||||
target: /app/content
|
target: /app/content
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
clustered-pytest:
|
clustered-pytest:
|
||||||
|
container_name: clustered-pytest
|
||||||
image: influxdata/docs-pytest
|
image: influxdata/docs-pytest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -242,6 +246,7 @@ services:
|
||||||
target: /app/content
|
target: /app/content
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
telegraf-pytest:
|
telegraf-pytest:
|
||||||
|
container_name: telegraf-pytest
|
||||||
image: influxdata/docs-pytest
|
image: influxdata/docs-pytest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -290,6 +295,7 @@ services:
|
||||||
target: /app/content
|
target: /app/content
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
v2-pytest:
|
v2-pytest:
|
||||||
|
container_name: v2-pytest
|
||||||
image: influxdata/docs-pytest
|
image: influxdata/docs-pytest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -339,6 +345,7 @@ services:
|
||||||
target: /app/content
|
target: /app/content
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
influxdb2:
|
influxdb2:
|
||||||
|
container_name: influxdb2
|
||||||
image: influxdb:2
|
image: influxdb:2
|
||||||
ports:
|
ports:
|
||||||
- 8086:8086
|
- 8086:8086
|
||||||
|
@ -366,6 +373,7 @@ services:
|
||||||
source: influxdb2-config
|
source: influxdb2-config
|
||||||
target: /etc/influxdb2
|
target: /etc/influxdb2
|
||||||
remark-lint:
|
remark-lint:
|
||||||
|
container_name: remark-lint
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: .ci/Dockerfile.remark
|
dockerfile: .ci/Dockerfile.remark
|
||||||
|
|
|
@ -22,22 +22,105 @@ See [Get started](/telegraf/v1/get_started/) to quickly get up and running with
|
||||||
|
|
||||||
## Generate a configuration file
|
## Generate a configuration file
|
||||||
|
|
||||||
A default Telegraf configuration file can be auto-generated by Telegraf:
|
The `telegraf config` command lets you generate a configuration file using Telegraf's list of plugins.
|
||||||
|
|
||||||
```
|
- [Create a configuration with default input and output plugins](#create-a-configuration-with-default-input-and-output-plugins)
|
||||||
|
- [Create a configuration with specific input and output plugins](#create-a-configuration-with-specific-input-and-output-plugins)
|
||||||
|
|
||||||
|
### Create a configuration with default input and output plugins
|
||||||
|
|
||||||
|
To generate a configuration file with default input and output plugins enabled,
|
||||||
|
enter the following command in your terminal:
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Linux and macOS](#)
|
||||||
|
[Windows](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
telegraf config > telegraf.conf
|
telegraf config > telegraf.conf
|
||||||
```
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
To generate a configuration file with specific inputs and outputs, you can use the
|
{{% code-tab-content %}}
|
||||||
`--input-filter` and `--output-filter` flags:
|
```powershell
|
||||||
|
.\telegraf.exe config > telegraf.conf
|
||||||
```
|
```
|
||||||
telegraf --input-filter cpu:mem:net:swap --output-filter influxdb:kafka config
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
The generated file contains settings for all available plugins--some are enabled and the rest are commented out.
|
||||||
|
|
||||||
|
### Create a configuration file with specific input and output plugins
|
||||||
|
|
||||||
|
To generate a configuration file that contains settings for only specific plugins,
|
||||||
|
use the `--input-filter` and `--output-filter` options to
|
||||||
|
specify [input plugins](/telegraf/v1/plugins/input_plugins)
|
||||||
|
and [output plugins](/telegraf/v1/plugins/output_plugins/).
|
||||||
|
Use a colon (`:`) to separate plugin names.
|
||||||
|
|
||||||
|
#### Syntax
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Linux and macOS](#)
|
||||||
|
[Windows](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
telegraf \
|
||||||
|
--input-filter <INPUT_PLUGIN_NAME>[:<INPUT_PLUGIN_NAME>] \
|
||||||
|
--output-filter <OUTPUT_PLUGIN_NAME>[:<OUTPUT_PLUGIN_NAME>] \
|
||||||
|
config > telegraf.conf
|
||||||
```
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```powershell
|
||||||
|
.\telegraf.exe `
|
||||||
|
--input-filter <INPUT_PLUGIN_NAME>[:<INPUT_PLUGIN_NAME>] `
|
||||||
|
--output-filter <OUTPUT_PLUGIN_NAME>[:<OUTPUT_PLUGIN_NAME>] `
|
||||||
|
config > telegraf.conf
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
The following example shows how to include configuration sections for the
|
||||||
|
[`inputs.cpu`](/telegraf/v1/plugins/#input-cpu),
|
||||||
|
[`inputs.http_listener_v2`](/telegraf/v1/plugins/#input-http_listener_v2),
|
||||||
|
[`outputs.influxdb_v2`](/telegraf/v1/plugins/#output-influxdb_v2), and
|
||||||
|
[`outputs.file`](/telegraf/v1/plugins/#output-file) plugins:
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Linux and macOS](#)
|
||||||
|
[Windows](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
telegraf \
|
||||||
|
--input-filter cpu:http_listener_v2 \
|
||||||
|
--output-filter influxdb_v2:file \
|
||||||
|
config > telegraf.conf
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```powershell
|
||||||
|
.\telegraf.exe `
|
||||||
|
--input-filter cpu:http_listener_v2 `
|
||||||
|
--output-filter influxdb_v2:file `
|
||||||
|
config > telegraf.conf
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
For more advanced configuration details, see the
|
||||||
|
[configuration documentation](/telegraf/v1/administration/configuration/).
|
||||||
|
|
||||||
## Configuration file locations
|
## Configuration file locations
|
||||||
|
|
||||||
Use the `--config` flag to specify the configuration file location:
|
When starting Telegraf, use the `--config` flag to specify the configuration file location:
|
||||||
|
|
||||||
- Filename and path, for example: `--config /etc/default/telegraf`
|
- Filename and path, for example: `--config /etc/default/telegraf`
|
||||||
- Remote URL endpoint, for example: `--config "http://remote-URL-endpoint"`
|
- Remote URL endpoint, for example: `--config "http://remote-URL-endpoint"`
|
||||||
|
@ -46,9 +129,56 @@ Use the `--config-directory` flag to include files ending with `.conf` in the
|
||||||
specified directory in the Telegraf configuration.
|
specified directory in the Telegraf configuration.
|
||||||
|
|
||||||
On most systems, the default locations are `/etc/telegraf/telegraf.conf` for
|
On most systems, the default locations are `/etc/telegraf/telegraf.conf` for
|
||||||
the main configuration file and `/etc/telegraf/telegraf.d` for the directory of
|
the main configuration file and `/etc/telegraf/telegraf.d` (on Windows, `C:\"Program Files"\Telegraf\telegraf.d`) for the directory of
|
||||||
configuration files.
|
configuration files.
|
||||||
|
|
||||||
|
Telegraf processes each configuration file separately, and
|
||||||
|
the effective configuration is the union of all the files.
|
||||||
|
If any file isn't a valid configuration, Telegraf returns an error.
|
||||||
|
|
||||||
|
{{% warn %}}
|
||||||
|
|
||||||
|
#### Partial configurations aren't supported
|
||||||
|
|
||||||
|
Telegraf doesn't concatenate configuration files before processing them.
|
||||||
|
Each configuration file that you provide must be a valid configuration.
|
||||||
|
|
||||||
|
If you want to use separate files to manage a configuration, you can use your
|
||||||
|
own custom code to concatenate and pre-process the files, and then provide the
|
||||||
|
complete configuration to Telegraf--for example:
|
||||||
|
|
||||||
|
1. Configure plugin sections and assign partial configs a file extension different
|
||||||
|
from `.conf` to prevent Telegraf loading them--for example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# main.opcua: Main configuration file
|
||||||
|
...
|
||||||
|
[[inputs.opcua_listener]]
|
||||||
|
name = "PluginSection"
|
||||||
|
endpoint = "opc.tcp://10.0.0.53:4840"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# group_1.opcua
|
||||||
|
[[inputs.opcua_listener.group]]
|
||||||
|
name = "SubSection1"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# group_2.opcua
|
||||||
|
[[inputs.opcua_listener.group]]
|
||||||
|
name = "SubSection2"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Before you start Telegraf, run your custom script to concatenate `main.opcua`, `group_1.opcua`,
|
||||||
|
`group_2.opcua` into a valid `telegraf.conf`.
|
||||||
|
3. Start Telegraf with the complete, valid `telegraf.conf` configuration.
|
||||||
|
|
||||||
|
{{% /warn %}}
|
||||||
|
|
||||||
## Set environment variables
|
## Set environment variables
|
||||||
|
|
||||||
Use environment variables anywhere in the configuration file by enclosing them in `${}`.
|
Use environment variables anywhere in the configuration file by enclosing them in `${}`.
|
||||||
|
@ -63,6 +193,8 @@ You can also set environment variables using the Linux `export` command: `export
|
||||||
|
|
||||||
Set environment variables in the Telegraf environment variables file (`/etc/default/telegraf`)--for example:
|
Set environment variables in the Telegraf environment variables file (`/etc/default/telegraf`)--for example:
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
USER="alice"
|
USER="alice"
|
||||||
INFLUX_URL="http://localhost:8086"
|
INFLUX_URL="http://localhost:8086"
|
||||||
|
@ -72,7 +204,7 @@ INFLUX_PASSWORD="monkey123"
|
||||||
|
|
||||||
In the Telegraf configuration file (`/etc/telegraf.conf`), reference the variables--for example:
|
In the Telegraf configuration file (`/etc/telegraf.conf`), reference the variables--for example:
|
||||||
|
|
||||||
```sh
|
```toml
|
||||||
[global_tags]
|
[global_tags]
|
||||||
user = "${USER}"
|
user = "${USER}"
|
||||||
|
|
||||||
|
@ -86,7 +218,7 @@ In the Telegraf configuration file (`/etc/telegraf.conf`), reference the variabl
|
||||||
|
|
||||||
When Telegraf runs, the effective configuration is the following:
|
When Telegraf runs, the effective configuration is the following:
|
||||||
|
|
||||||
```sh
|
```toml
|
||||||
[global_tags]
|
[global_tags]
|
||||||
user = "alice"
|
user = "alice"
|
||||||
|
|
||||||
|
@ -94,7 +226,6 @@ When Telegraf runs, the effective configuration is the following:
|
||||||
urls = "http://localhost:8086"
|
urls = "http://localhost:8086"
|
||||||
skip_database_creation = true
|
skip_database_creation = true
|
||||||
password = "monkey123"
|
password = "monkey123"
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Global tags
|
## Global tags
|
||||||
|
|
|
@ -12,6 +12,6 @@ menu:
|
||||||
|
|
||||||
Telegraf input plugins are used with the InfluxData time series platform to collect metrics from the system, services, or third-party APIs. All metrics are gathered from the inputs you enable and configure in the [Telegraf configuration file](/telegraf/v1/configuration/).
|
Telegraf input plugins are used with the InfluxData time series platform to collect metrics from the system, services, or third-party APIs. All metrics are gathered from the inputs you enable and configure in the [Telegraf configuration file](/telegraf/v1/configuration/).
|
||||||
|
|
||||||
For a complete list of input plugins and links to their detailed configuration options, see [input plugins](/telegraf/v1/plugins/inputs/).
|
For a complete list of input plugins and links to their detailed configuration options, see [input plugins](/telegraf/v1/plugins/#input-plugins).
|
||||||
|
|
||||||
In addition to plugin-specific data formats, Telegraf supports a set of [common data formats](/telegraf/v1/data_formats/input/) available when configuring many of the Telegraf input plugins.
|
In addition to plugin-specific data formats, Telegraf supports a set of [common data formats](/telegraf/v1/data_formats/input/) available when configuring many of the Telegraf input plugins.
|
||||||
|
|
|
@ -11,6 +11,6 @@ menu:
|
||||||
---
|
---
|
||||||
Output plugins define where Telegraf will deliver the collected metrics. Send metrics to InfluxDB or to a variety of other datastores, services, and message queues, including Graphite, OpenTSDB, Datadog, Librato, Kafka, MQTT, and NSQ.
|
Output plugins define where Telegraf will deliver the collected metrics. Send metrics to InfluxDB or to a variety of other datastores, services, and message queues, including Graphite, OpenTSDB, Datadog, Librato, Kafka, MQTT, and NSQ.
|
||||||
|
|
||||||
For a complete list of output plugins and links to their detailed configuration options, see [output plugins](/telegraf/v1/plugins/outputs/).
|
For a complete list of output plugins and links to their detailed configuration options, see [output plugins](/telegraf/v1/plugins/#output-plugins).
|
||||||
|
|
||||||
In addition to plugin-specific data formats, Telegraf supports a set of [common data formats](/telegraf/v1/data_formats/output/) available when configuring many of the Telegraf output plugins.
|
In addition to plugin-specific data formats, Telegraf supports a set of [common data formats](/telegraf/v1/data_formats/output/) available when configuring many of the Telegraf output plugins.
|
||||||
|
|
|
@ -13,32 +13,10 @@ aliases:
|
||||||
This page provides directions for installing, starting, and configuring Telegraf.
|
This page provides directions for installing, starting, and configuring Telegraf.
|
||||||
To install Telegraf, do the following:
|
To install Telegraf, do the following:
|
||||||
|
|
||||||
- [Download Telegraf](#download)
|
|
||||||
- [Review requirements](#requirements)
|
- [Review requirements](#requirements)
|
||||||
- [Complete the installation](#installation)
|
- [Download and install Telegraf](#download-and-install-telegraf)
|
||||||
- [Custom compile Telegraf](#custom-compile)
|
- [Custom compile Telegraf](#custom-compile)
|
||||||
|
|
||||||
## Download
|
|
||||||
|
|
||||||
Download the latest Telegraf release at the [InfluxData download page](https://www.influxdata.com/downloads/).
|
|
||||||
|
|
||||||
### Verify Linux releases using GPG
|
|
||||||
|
|
||||||
InfluxData uses [GPG (GnuPG)](https://www.gnupg.org/software/) to sign released software and provides
|
|
||||||
public key and encrypted private key (`.key` file) pairs that you can use to verify the integrity of downloads from the InfluxData repository.
|
|
||||||
|
|
||||||
Before running the [install](#install) sample code, substitute the key-pair compatible with your OS version:
|
|
||||||
|
|
||||||
For newer OS releases (for example, Ubuntu 20.04 LTS and newer) that support subkey verification:
|
|
||||||
|
|
||||||
- Private key file: `influxdata-archive.key`
|
|
||||||
- Public key: `943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515`
|
|
||||||
|
|
||||||
For all Ubuntu and Debian versions, including older versions (for example, CentOS/RHEL 7, Ubuntu 18.04 LTS, or Debian Buster) that don't support subkeys for verification:
|
|
||||||
|
|
||||||
- Private key file: `influxdata-archive_compat.key`
|
|
||||||
- Public key: `393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c`
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
Installation of the Telegraf package may require `root` or administrator privileges to complete successfully. <!--check instruction for each one to clarify-->
|
Installation of the Telegraf package may require `root` or administrator privileges to complete successfully. <!--check instruction for each one to clarify-->
|
||||||
|
@ -60,7 +38,100 @@ Telegraf uses a host's local time in UTC to assign timestamps to data.
|
||||||
Use the Network Time Protocol (NTP) to synchronize time between hosts. If hosts' clocks
|
Use the Network Time Protocol (NTP) to synchronize time between hosts. If hosts' clocks
|
||||||
aren't synchronized with NTP, the timestamps on the data might be inaccurate.
|
aren't synchronized with NTP, the timestamps on the data might be inaccurate.
|
||||||
|
|
||||||
## Install
|
## Download and install Telegraf
|
||||||
|
|
||||||
|
<span id="installation"></span>
|
||||||
|
|
||||||
|
_**Recommended**_: Before you open and install packages and downloaded files, use SHA
|
||||||
|
checksum verification and GPG signature verification to ensure the files are
|
||||||
|
intact and authentic.
|
||||||
|
|
||||||
|
SHA checksum and GPG signature verification are complementary checks.
|
||||||
|
|
||||||
|
_For some Linux platforms, the [installation instructions](#download-and-install-instructions) include steps to verify downloaded packages and binaries._
|
||||||
|
|
||||||
|
For more information, see the following:
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "Verify download integrity using SHA-256" %}}
|
||||||
|
|
||||||
|
For each released binary, InfluxData publishes the SHA checksum that
|
||||||
|
you can use to verify that the downloaded file is intact and hasn't been corrupted.
|
||||||
|
|
||||||
|
To use the SHA checksum to verify the downloaded file, do the following:
|
||||||
|
|
||||||
|
1. In the [downloads page](https://www.influxdata.com/downloads),
|
||||||
|
select the **Version** and **Platform** for your download.
|
||||||
|
|
||||||
|
The page displays the unique SHA256 checksum for the file--for example:
|
||||||
|
|
||||||
|
{{< img-hd src="/img/telegraf/downloads-telegraf-linux-amd64.png" alt="Screenshot of InfluxData downloads page showing the Telegraf SHA256 and code snippet" />}}
|
||||||
|
|
||||||
|
2. Copy the SHA256 value--for example:
|
||||||
|
|
||||||
|
```text
|
||||||
|
030182d2dca7bf4793fb741d1bbf9c35cf2afb84e13802ac866914f72271b8ea
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Compute the SHA checksum of the downloaded file and compare it to the
|
||||||
|
published checksum--for example, enter the following command in your terminal.
|
||||||
|
|
||||||
|
_Note: Include two spaces between the checksum and the filename._
|
||||||
|
|
||||||
|
<!--test:actual
|
||||||
|
```sh
|
||||||
|
curl -s --location -O \
|
||||||
|
"https://dl.influxdata.com/telegraf/releases/telegraf-${telegraf_latest_patches_v1}_linux_amd64.tar.gz"
|
||||||
|
echo "030182d2dca7bf4793fb741d1bbf9c35cf2afb84e13802ac866914f72271b8ea telegraf-${telegraf_latest_patches_v1}_linux_amd64.tar.gz" \
|
||||||
|
| sha256sum -c -
|
||||||
|
```
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
```bash
|
||||||
|
echo '030182d2dca7bf4793fb741d1bbf9c35cf2afb84e13802ac866914f72271b8ea telegraf-{{% latest-patch %}}_linux_amd64.tar.gz' \
|
||||||
|
| sha256sum -c -
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace the following:
|
||||||
|
|
||||||
|
- {{% code-placeholder-key %}}`030182d2dca7bf4793fb741d1bbf9c35cf2afb84e13802ac866914f72271b8ea`{{% /code-placeholder-key %}}: the SHA checksum copied from the downloads page
|
||||||
|
|
||||||
|
If the checksums match, the output is the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
telegraf-{{% latest-patch %}}_linux_amd64.tar.gz: OK
|
||||||
|
```
|
||||||
|
|
||||||
|
Otherwise, an error message.
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{% expand "Verify file integrity and authenticity using GPG" %}}
|
||||||
|
|
||||||
|
InfluxData uses [GPG (GnuPG)](https://www.gnupg.org/software/) to sign released software and provides
|
||||||
|
public key and encrypted private key (`.key` file) pairs that you can use to
|
||||||
|
verify the integrity of packages and binaries from the InfluxData repository.
|
||||||
|
|
||||||
|
Before running the [install](#install) sample code, substitute the key-pair compatible with your OS version:
|
||||||
|
|
||||||
|
For newer OS releases (for example, Ubuntu 20.04 LTS and newer, Debian Buster
|
||||||
|
and newer) that support subkey verification:
|
||||||
|
|
||||||
|
- Private key file: [`influxdata-archive.key`](https://repos.influxdata.com/influxdata-archive.key)
|
||||||
|
- Public key: `943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515`
|
||||||
|
|
||||||
|
For older versions (for example, CentOS/RHEL 7, Ubuntu 18.04 LTS, or Debian
|
||||||
|
Stretch) that don't support subkeys for verification:
|
||||||
|
|
||||||
|
- Private key file: [`influxdata-archive_compat.key`](https://repos.influxdata.com/influxdata-archive_compat.key)
|
||||||
|
- Public key: `393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c`
|
||||||
|
|
||||||
|
_For security, InfluxData periodically rotates keys and publishes the new key pairs._
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
|
<span id="download-and-install-instructions"></span>
|
||||||
|
|
||||||
{{< tabs-wrapper >}}
|
{{< tabs-wrapper >}}
|
||||||
{{% tabs style="even-wrap" %}}
|
{{% tabs style="even-wrap" %}}
|
||||||
|
@ -68,56 +139,79 @@ aren't synchronized with NTP, the timestamps on the data might be inaccurate.
|
||||||
[RedHat & CentOS](#)
|
[RedHat & CentOS](#)
|
||||||
[SLES & openSUSE](#)
|
[SLES & openSUSE](#)
|
||||||
[FreeBSD/PC-BSD](#)
|
[FreeBSD/PC-BSD](#)
|
||||||
|
[Linux binaries (AMD)](#)
|
||||||
|
[Linux binaries (ARM)](#)
|
||||||
[macOS](#)
|
[macOS](#)
|
||||||
[Windows](#)
|
[Windows](#)
|
||||||
{{% /tabs %}}
|
{{% /tabs %}}
|
||||||
<!---------- BEGIN Ubuntu & Debian ---------->
|
<!---------- BEGIN Ubuntu & Debian ---------->
|
||||||
{{% tab-content %}}
|
{{% tab-content %}}
|
||||||
Debian and Ubuntu users can install the latest stable version of Telegraf using the `apt-get` package manager.
|
Debian and Ubuntu users can install the latest stable version of Telegraf using
|
||||||
|
the `apt-get` package manager.
|
||||||
|
|
||||||
- [Install from the InfluxData repository](#install-from-the-influxdata-repository)
|
- [Install from the InfluxData repository](#install-from-the-influxdata-repository)
|
||||||
- [Install from a `.deb` file](#install-from-a-deb-file)
|
- [Install from a `.deb` file](#install-from-a-deb-file)
|
||||||
|
|
||||||
#### Install from the InfluxData repository
|
### Install from the InfluxData repository
|
||||||
|
|
||||||
Run the following commands using `apt-get` to install Telegraf from the InfluxData repository:
|
Run the following commands using `apt-get` to install Telegraf from the InfluxData
|
||||||
|
repository:
|
||||||
|
|
||||||
{{< code-tabs-wrapper >}}
|
{{< code-tabs-wrapper >}}
|
||||||
{{% code-tabs %}}
|
{{% code-tabs %}}
|
||||||
[All versions](#)
|
|
||||||
[Ubuntu 20.04 LTS and newer](#)
|
[Ubuntu 20.04 LTS and newer](#)
|
||||||
|
[Older than Ubuntu 20.04](#)
|
||||||
{{% /code-tabs %}}
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
{{% code-tab-content %}}
|
{{% code-tab-content %}}
|
||||||
|
<!------------------------BEGIN UBUNTU 20.04 LTS AND NEWER--------------------->
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --silent --location -O \
|
||||||
|
https://repos.influxdata.com/influxdata-archive.key \
|
||||||
|
&& echo "943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515 influxdata-archive.key" \
|
||||||
|
| sha256sum -c - && cat influxdata-archive.key \
|
||||||
|
| gpg --dearmor \
|
||||||
|
| sudo tee /etc/apt/trusted.gpg.d/influxdata-archive.gpg > /dev/null \
|
||||||
|
&& echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main' \
|
||||||
|
| sudo tee /etc/apt/sources.list.d/influxdata.list
|
||||||
|
sudo apt-get update && sudo apt-get install telegraf
|
||||||
|
```
|
||||||
|
|
||||||
|
<!------------------------END UBUNTU 20.04 LTS AND NEWER--------------------->
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
<!------------------------BEGIN OLDER THAN UBUNTU 20.04 LTS--------------------->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# influxdata-archive_compat.key GPG Fingerprint: 9D539D90D3328DC7D6C8D3B9D8FF8E1F7DF8B07E
|
# influxdata-archive_compat.key GPG Fingerprint: 9D539D90D3328DC7D6C8D3B9D8FF8E1F7DF8B07E
|
||||||
curl -s https://repos.influxdata.com/influxdata-archive_compat.key > influxdata-archive_compat.key
|
curl --silent --location -O \
|
||||||
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
|
https://repos.influxdata.com/influxdata-archive_compat.key \
|
||||||
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
|
&& echo "393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key" \
|
||||||
|
| sha256sum -c - \
|
||||||
|
&& cat influxdata-archive_compat.key \
|
||||||
|
| gpg --dearmor \
|
||||||
|
| sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
|
||||||
|
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' \
|
||||||
|
| sudo tee /etc/apt/sources.list.d/influxdata.list
|
||||||
sudo apt-get update && sudo apt-get install telegraf
|
sudo apt-get update && sudo apt-get install telegraf
|
||||||
```
|
```
|
||||||
{{% /code-tab-content %}}
|
|
||||||
|
|
||||||
{{% code-tab-content %}}
|
<!------------------------END OLDER THAN UBUNTU 20.04 LTS--------------------->
|
||||||
```bash
|
|
||||||
curl -s https://repos.influxdata.com/influxdata-archive.key > influxdata-archive.key
|
|
||||||
echo '943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515 influxdata-archive.key' | sha256sum -c && cat influxdata-archive.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive.gpg > /dev/null
|
|
||||||
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
|
|
||||||
sudo apt-get update && sudo apt-get install telegraf
|
|
||||||
```
|
|
||||||
{{% /code-tab-content %}}
|
{{% /code-tab-content %}}
|
||||||
{{< /code-tabs-wrapper >}}
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
#### Install from a `.deb` file
|
### Install from a `.deb` file
|
||||||
|
|
||||||
To manually install the Debian package from a `.deb` file:
|
To manually install the Debian package from a `.deb` file:
|
||||||
|
|
||||||
1. Download the latest Telegraf `.deb` release
|
1. Download the latest Telegraf `.deb` release
|
||||||
from the Telegraf section of the [downloads page](https://influxdata.com/downloads/).
|
from the [downloads page](https://influxdata.com/downloads/#telegraf).
|
||||||
2. Run the following command (making sure to supply the correct version number for the downloaded file):
|
2. Run the following command (making sure to supply the correct version number
|
||||||
|
for the downloaded file):
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo dpkg -i telegraf_{{< latest-patch >}}-1_amd64.deb
|
sudo dpkg -i telegraf_{{% latest-patch %}}-1_amd64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% /tab-content %}}
|
{{% /tab-content %}}
|
||||||
|
@ -129,19 +223,25 @@ To use the `yum` package manager to install the latest stable version of Telegra
|
||||||
|
|
||||||
1. In your terminal, enter the following command to add the InfluxData repository to the `yum` configuration:
|
1. In your terminal, enter the following command to add the InfluxData repository to the `yum` configuration:
|
||||||
|
|
||||||
|
<!--test:external:using-Dockerfile.test-oss.centos-->
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo
|
cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
|
||||||
[influxdb]
|
[influxdata]
|
||||||
name = InfluxData Repository - Stable
|
name = InfluxData Repository - Stable
|
||||||
baseurl = https://repos.influxdata.com/stable/\$basearch/main
|
baseurl = https://repos.influxdata.com/stable/${basearch}/main
|
||||||
enabled = 1
|
enabled = 1
|
||||||
gpgcheck = 1
|
gpgcheck = 1
|
||||||
gpgkey = https://repos.influxdata.com/influxdata-archive_compat.key
|
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-influxdata
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Enter the following command to install `telegraf` from the repository.
|
2. Enter the following command to install `telegraf` from the repository.
|
||||||
|
|
||||||
|
<!--test:external:using-Dockerfile.test-oss.centos-->
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo yum install telegraf
|
sudo yum install telegraf
|
||||||
```
|
```
|
||||||
|
@ -157,6 +257,8 @@ To use the `zypper` package manager to install the latest stable version of Tele
|
||||||
|
|
||||||
1. In your terminal, enter the following command to add the Go repository to the `zypper` configuration:
|
1. In your terminal, enter the following command to add the Go repository to the `zypper` configuration:
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# add go repository
|
# add go repository
|
||||||
zypper ar -f obs://devel:languages:go/ go
|
zypper ar -f obs://devel:languages:go/ go
|
||||||
|
@ -164,6 +266,8 @@ To use the `zypper` package manager to install the latest stable version of Tele
|
||||||
|
|
||||||
2. Enter the following command to install `telegraf`.
|
2. Enter the following command to install `telegraf`.
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# install latest telegraf
|
# install latest telegraf
|
||||||
zypper in telegraf
|
zypper in telegraf
|
||||||
|
@ -176,16 +280,70 @@ Telegraf is part of the FreeBSD package system.
|
||||||
|
|
||||||
To use the `pkg` package manager to install the latest stable version of Telegraf, enter the following command:
|
To use the `pkg` package manager to install the latest stable version of Telegraf, enter the following command:
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo pkg install telegraf
|
sudo pkg install telegraf
|
||||||
```
|
```
|
||||||
|
|
||||||
The `telegraf` configuration file is installed at `/usr/local/etc/telegraf.conf`.
|
The `telegraf` configuration file is installed at `/usr/local/etc/telegraf.conf`.
|
||||||
Examples are installed at `/usr/local/etc/telegraf.conf.sample`.
|
Examples are installed at `/usr/local/etc/telegraf.conf.sample`.
|
||||||
|
<!------------ END FreeBSD/PC-BSD ------------>
|
||||||
{{% /tab-content %}}
|
{{% /tab-content %}}
|
||||||
<!---------- BEGIN MACOS ---------->
|
|
||||||
{{% tab-content %}}
|
{{% tab-content %}}
|
||||||
|
<!---------- BEGIN Linux binaries AMD ---------->
|
||||||
|
|
||||||
|
Choose from the following options to install Telegraf binary files for Linux AMD:
|
||||||
|
|
||||||
|
- To install on Linux AMDv7, see the [downloads page](https://www.influxdata.com/downloads/#telegraf).
|
||||||
|
- [Download and install on Linux AMDv8](#download-and-install-on-linux-amdv8)
|
||||||
|
|
||||||
|
### Download and install on Linux AMDv8
|
||||||
|
|
||||||
|
{{% code-placeholders "030182d2dca7bf4793fb741d1bbf9c35cf2afb84e13802ac866914f72271b8ea" %}}
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -s --location -O \
|
||||||
|
https://dl.influxdata.com/telegraf/releases/telegraf-{{% latest-patch %}}_linux_amd64.tar.gz \
|
||||||
|
&& echo "030182d2dca7bf4793fb741d1bbf9c35cf2afb84e13802ac866914f72271b8ea telegraf-{{% latest-patch %}}_linux_amd64.tar.gz" \
|
||||||
|
| sha256sum -c -
|
||||||
|
```
|
||||||
|
|
||||||
|
{{% /code-placeholders %}}
|
||||||
|
|
||||||
|
Replace the following:
|
||||||
|
|
||||||
|
- {{% code-placeholder-key %}}`0c57ff1a4a3af5fa387d23b0bc743b8eaed3a110d4ae7d422c439d2911cdf9b1`{{% /code-placeholder-key %}}: the SHA checksum from the [downloads page](https://www.influxdata.com/downloads/#telegraf)
|
||||||
|
|
||||||
|
<!---------- END Linux binaries AMD ---------->
|
||||||
|
{{% /tab-content %}}
|
||||||
|
{{% tab-content %}}
|
||||||
|
<!---------- BEGIN Linux binaries ARM ---------->
|
||||||
|
Choose from the following options to install Telegraf binary files for Linux ARM:
|
||||||
|
|
||||||
|
- To install on Linux ARM(32-bit), see the [downloads page](https://www.influxdata.com/downloads/#telegraf).
|
||||||
|
- [Download and install on Linux ARM (64-bit)](#download-and-install-on-linux-arm-64)
|
||||||
|
|
||||||
|
### Download and install on Linux AMDv8
|
||||||
|
|
||||||
|
{{% code-placeholders "030182d2dca7bf4793fb741d1bbf9c35cf2afb84e13802ac866914f72271b8ea" %}}
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -s --location -O \
|
||||||
|
https://dl.influxdata.com/telegraf/releases/telegraf-{{% latest-patch %}}_linux_arm64.tar.gz \
|
||||||
|
&& echo "0c57ff1a4a3af5fa387d23b0bc743b8eaed3a110d4ae7d422c439d2911cdf9b1 telegraf-{{% latest-patch %}}_linux_arm64.tar.gz" \
|
||||||
|
| sha256sum -c -
|
||||||
|
```
|
||||||
|
{{% /code-placeholders %}}
|
||||||
|
|
||||||
|
Replace the following:
|
||||||
|
|
||||||
|
- {{% code-placeholder-key %}}`0c57ff1a4a3af5fa387d23b0bc743b8eaed3a110d4ae7d422c439d2911cdf9b1`{{% /code-placeholder-key %}}: the SHA checksum from the [downloads page](https://www.influxdata.com/downloads/#telegraf)
|
||||||
|
|
||||||
|
<!---------- END Linux binaries ARM ---------->
|
||||||
|
{{% /tab-content %}}
|
||||||
|
{{% tab-content %}}
|
||||||
|
<!---------- BEGIN MACOS ---------->
|
||||||
Choose from the following options to install Telegraf for macOS:
|
Choose from the following options to install Telegraf for macOS:
|
||||||
|
|
||||||
- To manually install Telegraf from a file, see the [downloads page](https://www.influxdata.com/downloads/).
|
- To manually install Telegraf from a file, see the [downloads page](https://www.influxdata.com/downloads/).
|
||||||
|
@ -201,7 +359,7 @@ The `telegraf` binary installed by Homebrew differs from the macOS `.dmg` builds
|
||||||
|
|
||||||
- `telegraf` (Homebrew) isn't a static binary.
|
- `telegraf` (Homebrew) isn't a static binary.
|
||||||
- `telegraf` (Homebrew) works with the Telegraf CPU plugin (due to Homebrew support for [Cgo](https://pkg.go.dev/cmd/cgo)).
|
- `telegraf` (Homebrew) works with the Telegraf CPU plugin (due to Homebrew support for [Cgo](https://pkg.go.dev/cmd/cgo)).
|
||||||
The `.dmg` builds available on [downloads](https://www.influxdata.com/downloads/) don't support the CPU plugin.
|
The `.dmg` builds available on the [downloads page](https://www.influxdata.com/downloads/) don't support the CPU plugin.
|
||||||
|
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
|
@ -210,6 +368,8 @@ To install using Homebrew, do the following:
|
||||||
1. If you haven't already, follow the instructions to install the [Homebrew](http://brew.sh/) package manager.
|
1. If you haven't already, follow the instructions to install the [Homebrew](http://brew.sh/) package manager.
|
||||||
2. Enter the following commands to update brew and install Telegraf:
|
2. Enter the following commands to update brew and install Telegraf:
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
brew update && brew install telegraf
|
brew update && brew install telegraf
|
||||||
```
|
```
|
||||||
|
@ -234,6 +394,8 @@ To run `telegraf` in your terminal (in the foreground and not as a service), ent
|
||||||
{{% /code-tabs %}}
|
{{% /code-tabs %}}
|
||||||
{{% code-tab-content %}}
|
{{% code-tab-content %}}
|
||||||
<!---- BEGIN ARM ---->
|
<!---- BEGIN ARM ---->
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
telegraf -config /opt/homebrew/etc/telegraf.conf
|
telegraf -config /opt/homebrew/etc/telegraf.conf
|
||||||
```
|
```
|
||||||
|
@ -241,6 +403,8 @@ telegraf -config /opt/homebrew/etc/telegraf.conf
|
||||||
{{% /code-tab-content %}}
|
{{% /code-tab-content %}}
|
||||||
{{% code-tab-content %}}
|
{{% code-tab-content %}}
|
||||||
<!---- BEGIN INTEL ---->
|
<!---- BEGIN INTEL ---->
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
telegraf -config /usr/local/etc/telegraf.conf
|
telegraf -config /usr/local/etc/telegraf.conf
|
||||||
```
|
```
|
||||||
|
@ -302,7 +466,7 @@ In PowerShell _as an administrator_, do the following:
|
||||||
wget `
|
wget `
|
||||||
https://dl.influxdata.com/telegraf/releases/telegraf-{{% latest-patch %}}_windows_amd64.zip `
|
https://dl.influxdata.com/telegraf/releases/telegraf-{{% latest-patch %}}_windows_amd64.zip `
|
||||||
-UseBasicParsing `
|
-UseBasicParsing `
|
||||||
-OutFile telegraf-{{< latest-patch >}}_windows_amd64.zip
|
-OutFile telegraf-{{% latest-patch %}}_windows_amd64.zip
|
||||||
Expand-Archive .\telegraf-{{% latest-patch %}}_windows_amd64.zip `
|
Expand-Archive .\telegraf-{{% latest-patch %}}_windows_amd64.zip `
|
||||||
-DestinationPath 'C:\Program Files\InfluxData\telegraf\'
|
-DestinationPath 'C:\Program Files\InfluxData\telegraf\'
|
||||||
```
|
```
|
||||||
|
@ -357,17 +521,6 @@ The remaining instructions assume that `telegraf.exe` and `telegraf.conf` files
|
||||||
.\telegraf.exe --service start
|
.\telegraf.exe --service start
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
|
||||||
#### (Optional) Specify multiple configuration files
|
|
||||||
|
|
||||||
If you have multiple Telegraf configuration files, you can specify a `--config-directory` for the service to use:
|
|
||||||
|
|
||||||
1. Create a directory for configuration snippets at `C:\Program Files\Telegraf\telegraf.d`.
|
|
||||||
2. Include the `--config-directory` option when registering the service:
|
|
||||||
```powershell
|
|
||||||
C:\"Program Files"\Telegraf\telegraf.exe --service install --config C:\"Program Files"\Telegraf\telegraf.conf --config-directory C:\"Program Files"\Telegraf\telegraf.d
|
|
||||||
```
|
|
||||||
-->
|
|
||||||
|
|
||||||
### Logging and troubleshooting
|
### Logging and troubleshooting
|
||||||
|
|
||||||
|
@ -388,9 +541,13 @@ The following commands are available:
|
||||||
{{< /tab-content >}}
|
{{< /tab-content >}}
|
||||||
{{< /tabs-wrapper >}}
|
{{< /tabs-wrapper >}}
|
||||||
|
|
||||||
## Generate a custom configuration file
|
## Generate a configuration file
|
||||||
|
|
||||||
The `telegraf config` command lets you generate a configuration file using Telegraf's list of plugins.
|
The `telegraf config` command lets you generate a configuration file from
|
||||||
|
Telegraf's [plugin list](/telegraf/v1/commands/plugins/).
|
||||||
|
|
||||||
|
- [Create a configuration file with default input and output plugins](#create-a-configuration-file-with-default-input-and-output-plugins)
|
||||||
|
- [Create a configuration with specific input and output plugins](#create-a-configuration-file-with-specific-input-and-output-plugins)
|
||||||
|
|
||||||
### Create a configuration file with default input and output plugins
|
### Create a configuration file with default input and output plugins
|
||||||
|
|
||||||
|
@ -414,11 +571,14 @@ telegraf config > telegraf.conf
|
||||||
{{% /code-tab-content %}}
|
{{% /code-tab-content %}}
|
||||||
{{< /code-tabs-wrapper >}}
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
The generated file contains settings for all available plugins--some are enabled and the rest are commented out.
|
|
||||||
|
|
||||||
### Create a configuration file with specific input and output plugins
|
### Create a configuration file with specific input and output plugins
|
||||||
|
|
||||||
To generate a configuration file that contains settings for only specific input and output plugins, specify `telegraf` plugin filters--for example:
|
To generate a configuration file that contains settings for only specific plugins,
|
||||||
|
use the `--input-filter` and `--output-filter` options to
|
||||||
|
specify [input plugins](/telegraf/v1/plugins/input_plugins)
|
||||||
|
and [output plugins](/telegraf/v1/plugins/output_plugins/)--for example:
|
||||||
|
|
||||||
|
{{% code-placeholders "cpu|http|influxdb_v2|file" %}}
|
||||||
|
|
||||||
{{< code-tabs-wrapper >}}
|
{{< code-tabs-wrapper >}}
|
||||||
{{% code-tabs %}}
|
{{% code-tabs %}}
|
||||||
|
@ -428,21 +588,23 @@ To generate a configuration file that contains settings for only specific input
|
||||||
{{% code-tab-content %}}
|
{{% code-tab-content %}}
|
||||||
```bash
|
```bash
|
||||||
telegraf \
|
telegraf \
|
||||||
--input-filter <pluginname>[:<pluginname>] \
|
--input-filter cpu:http \
|
||||||
--output-filter <outputname>[:<outputname>] \
|
--output-filter influxdb_v2:file \
|
||||||
config > telegraf.conf
|
config > telegraf.conf
|
||||||
```
|
```
|
||||||
{{% /code-tab-content %}}
|
{{% /code-tab-content %}}
|
||||||
{{% code-tab-content %}}
|
{{% code-tab-content %}}
|
||||||
```powershell
|
```powershell
|
||||||
.\telegraf.exe `
|
.\telegraf.exe `
|
||||||
--input-filter <pluginname>[:<pluginname>] `
|
--input-filter cpu:http `
|
||||||
--output-filter <outputname>[:<outputname>] `
|
--output-filter influxdb_v2:file `
|
||||||
config > telegraf.conf
|
config > telegraf.conf
|
||||||
```
|
```
|
||||||
{{% /code-tab-content %}}
|
{{% /code-tab-content %}}
|
||||||
{{< /code-tabs-wrapper >}}
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
{{% /code-placeholders %}}
|
||||||
|
|
||||||
For more advanced configuration details, see the
|
For more advanced configuration details, see the
|
||||||
[configuration documentation](/telegraf/v1/administration/configuration/).
|
[configuration documentation](/telegraf/v1/administration/configuration/).
|
||||||
|
|
||||||
|
@ -461,17 +623,26 @@ Use the Telegraf custom builder tool to compile Telegraf with only the plugins y
|
||||||
|
|
||||||
### Build the custom builder tool
|
### Build the custom builder tool
|
||||||
|
|
||||||
1. Clone the Telegraf repository:
|
1. Clone the Telegraf repository and then change into the repository
|
||||||
|
directory--for example, enter the following command in your terminal:
|
||||||
|
|
||||||
|
<!--test:setup
|
||||||
|
```bash
|
||||||
|
# Run the command only if inside a Docker container
|
||||||
|
if get-container-info .is_running_in_docker; then
|
||||||
|
rm -rf ./telegraf
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--pytest-codeblocks:cont-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/influxdata/telegraf.git
|
git clone https://github.com/influxdata/telegraf.git && cd ./telegraf
|
||||||
```
|
```
|
||||||
2. Change directories into the top-level of the Telegraf repository:
|
2. To build the Telegraf custom builder tool, enter the following command:
|
||||||
|
|
||||||
```bash
|
<!--pytest-codeblocks:cont-->
|
||||||
cd telegraf
|
|
||||||
```
|
|
||||||
3. Build the Telegraf custom builder tool by entering the following command:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make build_tools
|
make build_tools
|
||||||
|
@ -479,9 +650,11 @@ Use the Telegraf custom builder tool to compile Telegraf with only the plugins y
|
||||||
|
|
||||||
### Run the custom builder to create a `telegraf` binary
|
### Run the custom builder to create a `telegraf` binary
|
||||||
|
|
||||||
The custom builder builds a `telegraf` binary with only the plugins included in the specified configuration files or directories.
|
The custom builder builds a `telegraf` binary with only the plugins included in
|
||||||
|
the specified configuration files or directories.
|
||||||
|
|
||||||
Run the `custom_builder` tool with at least one `--config` or `--config-directory` flag to specify Telegraf configuration files to build from.
|
Run the `custom_builder` tool with at least one `--config` or `--config-directory`
|
||||||
|
flag to specify Telegraf configuration files to build from.
|
||||||
|
|
||||||
- `--config`: accepts local file paths and URLs.
|
- `--config`: accepts local file paths and URLs.
|
||||||
- `--config-dir`: accepts local directory paths.
|
- `--config-dir`: accepts local directory paths.
|
||||||
|
@ -492,12 +665,33 @@ You can include multiple `--config` and `--config-dir` flags.
|
||||||
|
|
||||||
##### Single Telegraf configuration
|
##### Single Telegraf configuration
|
||||||
|
|
||||||
|
<!--pytest-codeblocks:cont-->
|
||||||
|
|
||||||
|
<!--test:setup
|
||||||
|
```bash
|
||||||
|
telegraf config create > /etc/telegraf.conf
|
||||||
|
```
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--pytest-codeblocks:cont-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./tools/custom_builder/custom_builder --config /etc/telegraf.conf
|
./tools/custom_builder/custom_builder --config /etc/telegraf.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Single Telegraf configuration and Telegraf configuration directory
|
##### Single Telegraf configuration and Telegraf configuration directory
|
||||||
|
|
||||||
|
<!--pytest-codeblocks:cont-->
|
||||||
|
|
||||||
|
<!--test:setup
|
||||||
|
```bash
|
||||||
|
mkdir -p /etc/telegraf/telegraf.d \
|
||||||
|
&& telegraf config create --input-filter http > /etc/telegraf/telegraf.d/http.conf
|
||||||
|
```
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--pytest-codeblocks:cont-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./tools/custom_builder/custom_builder \
|
./tools/custom_builder/custom_builder \
|
||||||
--config /etc/telegraf.conf \
|
--config /etc/telegraf.conf \
|
||||||
|
@ -506,6 +700,8 @@ You can include multiple `--config` and `--config-dir` flags.
|
||||||
|
|
||||||
##### Remote Telegraf configuration
|
##### Remote Telegraf configuration
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./tools/custom_builder/custom_builder \
|
./tools/custom_builder/custom_builder \
|
||||||
--config http://url-to-remote-telegraf/telegraf.conf
|
--config http://url-to-remote-telegraf/telegraf.conf
|
||||||
|
|
|
@ -77,7 +77,7 @@ telegraf:
|
||||||
versions: [v1]
|
versions: [v1]
|
||||||
latest: v1.31
|
latest: v1.31
|
||||||
latest_patches:
|
latest_patches:
|
||||||
v1: 1.31.0
|
v1: 1.31.3
|
||||||
|
|
||||||
chronograf:
|
chronograf:
|
||||||
name: Chronograf
|
name: Chronograf
|
||||||
|
|
12
lefthook.yml
12
lefthook.yml
|
@ -50,7 +50,7 @@ pre-commit:
|
||||||
tags: test,codeblocks,v2
|
tags: test,codeblocks,v2
|
||||||
env:
|
env:
|
||||||
- SERVICE: cloud-pytest
|
- SERVICE: cloud-pytest
|
||||||
run: docker compose run $SERVICE '{staged_files}'
|
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
|
||||||
cloud-dedicated-pytest:
|
cloud-dedicated-pytest:
|
||||||
tags: test,codeblocks,v3
|
tags: test,codeblocks,v3
|
||||||
glob: content/influxdb/cloud-dedicated/**/*.md
|
glob: content/influxdb/cloud-dedicated/**/*.md
|
||||||
|
@ -58,14 +58,14 @@ pre-commit:
|
||||||
- SERVICE: cloud-dedicated-pytest
|
- SERVICE: cloud-dedicated-pytest
|
||||||
run: |
|
run: |
|
||||||
./test/scripts/monitor-tests.sh start $SERVICE ;
|
./test/scripts/monitor-tests.sh start $SERVICE ;
|
||||||
docker compose run $SERVICE {staged_files} ;
|
docker compose run --name $SERVICE $SERVICE {staged_files} ;
|
||||||
./test/scripts/monitor-tests.sh stop $SERVICE
|
./test/scripts/monitor-tests.sh stop $SERVICE
|
||||||
cloud-serverless-pytest:
|
cloud-serverless-pytest:
|
||||||
tags: test,codeblocks,v3
|
tags: test,codeblocks,v3
|
||||||
glob: content/influxdb/cloud-serverless/**/*.md
|
glob: content/influxdb/cloud-serverless/**/*.md
|
||||||
env:
|
env:
|
||||||
- SERVICE: cloud-serverless-pytest
|
- SERVICE: cloud-serverless-pytest
|
||||||
run: docker compose run $SERVICE '{staged_files}'
|
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
|
||||||
clustered-pytest:
|
clustered-pytest:
|
||||||
tags: test,codeblocks,v3
|
tags: test,codeblocks,v3
|
||||||
glob: content/influxdb/clustered/**/*.md
|
glob: content/influxdb/clustered/**/*.md
|
||||||
|
@ -73,20 +73,20 @@ pre-commit:
|
||||||
- SERVICE: clustered-pytest
|
- SERVICE: clustered-pytest
|
||||||
run: |
|
run: |
|
||||||
./test/scripts/monitor-tests.sh start $SERVICE ;
|
./test/scripts/monitor-tests.sh start $SERVICE ;
|
||||||
docker compose run $SERVICE {staged_files} ;
|
docker compose run --name $SERVICE $SERVICE {staged_files} ;
|
||||||
./test/scripts/monitor-tests.sh stop $SERVICE
|
./test/scripts/monitor-tests.sh stop $SERVICE
|
||||||
telegraf-pytest:
|
telegraf-pytest:
|
||||||
tags: test,codeblocks
|
tags: test,codeblocks
|
||||||
glob: content/telegraf/**/*.md
|
glob: content/telegraf/**/*.md
|
||||||
env:
|
env:
|
||||||
- SERVICE: telegraf-pytest
|
- SERVICE: telegraf-pytest
|
||||||
run: docker compose run $SERVICE '{staged_files}'
|
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
|
||||||
v2-pytest:
|
v2-pytest:
|
||||||
tags: test,codeblocks,v2
|
tags: test,codeblocks,v2
|
||||||
glob: content/influxdb/v2/**/*.md
|
glob: content/influxdb/v2/**/*.md
|
||||||
env:
|
env:
|
||||||
- SERVICE: v2-pytest
|
- SERVICE: v2-pytest
|
||||||
run: docker compose run --rm $SERVICE '{staged_files}'
|
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
|
||||||
prettier:
|
prettier:
|
||||||
tags: frontend,style
|
tags: frontend,style
|
||||||
glob: "*.{css,js,ts,jsx,tsx}"
|
glob: "*.{css,js,ts,jsx,tsx}"
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
|
@ -0,0 +1,55 @@
|
||||||
|
# Description: Dockerfile for testing installation of InfluxDB and clients on CentOS Stream 9.
|
||||||
|
|
||||||
|
# Example build command:
|
||||||
|
# docker buildx build -t influxdatadocs/oss-centos --file test/Dockerfile.test-oss.centos .
|
||||||
|
|
||||||
|
# Example run command--logs are stored in the volume `influxdatadocs-oss-centos-log`:
|
||||||
|
# docker run --rm --mount type=volume,src=influxdatadocs-oss-centos-log,dst=/var/log/ influxdatadocs/oss-centos
|
||||||
|
|
||||||
|
|
||||||
|
FROM dokken/centos-stream-9:latest AS influxdb
|
||||||
|
LABEL name="test-oss-centos"
|
||||||
|
LABEL description="InfluxData Docs Test OSS install on CentOS"
|
||||||
|
|
||||||
|
LABEL "com.influxdata.docs"="https://docs.influxdata.com/influxdb/v2/install/?t=Linux"
|
||||||
|
|
||||||
|
ARG INFLUXDB_LATEST_PATCH=2.7.10
|
||||||
|
ARG TELEGRAF_LATEST_PATCH=1.31.3
|
||||||
|
ARG PUBLIC_SHA=943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515
|
||||||
|
ARG basearch=aarch64
|
||||||
|
|
||||||
|
# Install InfluxDB keys to verify client installs.
|
||||||
|
|
||||||
|
RUN curl --silent --location -O \
|
||||||
|
https://repos.influxdata.com/influxdata-archive.key \
|
||||||
|
&& echo "${PUBLIC_SHA} influxdata-archive.key" \
|
||||||
|
| sha256sum -c && cat influxdata-archive.key \
|
||||||
|
| gpg --dearmor \
|
||||||
|
| tee /etc/pki/rpm-gpg/RPM-GPG-KEY-influxdata > /dev/null
|
||||||
|
|
||||||
|
# Follow the documentation to add the InfluxData repository to the list of repositories.
|
||||||
|
RUN cat <<EOF | tee /etc/yum.repos.d/influxdata.repo
|
||||||
|
[influxdata]
|
||||||
|
name = InfluxData Repository - Stable
|
||||||
|
baseurl = https://repos.influxdata.com/stable/${basearch}/main
|
||||||
|
enabled = 1
|
||||||
|
gpgcheck = 1
|
||||||
|
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-influxdata
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Follow the install instructions (https://docs.influxdata.com/influxdb/v2.1/introduction/install/?t=Linux) for ARM, except for sudo (which isn't available in Docker).
|
||||||
|
|
||||||
|
RUN curl --silent --location -O \
|
||||||
|
"https://download.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_LATEST_PATCH}-1.${basearch}.rpm" \
|
||||||
|
&& yum localinstall -y "$(basename https://download.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_LATEST_PATCH}-1.${basearch}.rpm)"
|
||||||
|
|
||||||
|
# Follow the documentation to add the InfluxData repository to the list of repositories.
|
||||||
|
|
||||||
|
# Install InfluxDB clients to use in tests.
|
||||||
|
|
||||||
|
# Follow the Telegraf install instructions (https://docs.influxdata.com/telegraf/v1/install/?t=curl), except for sudo (which isn't available in Docker).
|
||||||
|
RUN yum install -y influxdb2-cli
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
# Run InfluxDB in the background, wait for it to start, and then test Telegraf.
|
||||||
|
CMD ["-c", "influxd > /var/log/influxd.log 2>&1 & while ! curl -s http://localhost:8086/health | grep -q '\"status\":\"pass\"'; do sleep 1; done; telegraf --config /etc/telegraf/telegraf.conf --test"]
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Description: Dockerfile for testing installation of InfluxDB and clients on Ubuntu.
|
||||||
|
|
||||||
|
# Example build command:
|
||||||
|
# docker buildx build -t influxdatadocs/oss-ubuntu --file test/Dockerfile.test-oss.ubuntu .
|
||||||
|
|
||||||
|
# Example run command--logs are stored in the volume `influxdatadocs-oss-ubuntu-log`:
|
||||||
|
# docker run --rm --mount type=volume,src=influxdatadocs-oss-ubuntu-log,dst=/var/log/ influxdatadocs/oss-ubuntu
|
||||||
|
|
||||||
|
|
||||||
|
FROM ubuntu:latest AS influxdb
|
||||||
|
LABEL name="test-oss-ubuntu"
|
||||||
|
LABEL description="InfluxData Docs Test OSS install on Ubuntu"
|
||||||
|
|
||||||
|
LABEL "com.influxdata.docs"="https://docs.influxdata.com/influxdb/v2/install/?t=Linux"
|
||||||
|
|
||||||
|
ARG INFLUXDB_LATEST_PATCH=2.7.10
|
||||||
|
ARG TELEGRAF_LATEST_PATCH=1.31.3
|
||||||
|
ARG PUBLIC_SHA=943666881a1b8d9b849b74caebf02d3465d6beb716510d86a39f6c8e8dac7515
|
||||||
|
ARG basearch=aarch64
|
||||||
|
|
||||||
|
# Install gnupg2 and curl to verify client installs.
|
||||||
|
RUN apt-get update && apt-get install -y gnupg2 curl
|
||||||
|
|
||||||
|
# Install InfluxDB keys to verify client installs.
|
||||||
|
RUN curl --silent --location -O \
|
||||||
|
https://repos.influxdata.com/influxdata-archive.key \
|
||||||
|
&& echo "${PUBLIC_SHA} influxdata-archive.key" \
|
||||||
|
| sha256sum -c && cat influxdata-archive.key \
|
||||||
|
| gpg --dearmor \
|
||||||
|
| tee /etc/apt/trusted.gpg.d/influxdata-archive.gpg > /dev/null \
|
||||||
|
&& echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main' \
|
||||||
|
| tee /etc/apt/sources.list.d/influxdata.list
|
||||||
|
|
||||||
|
# Install InfluxDB and clients to use in tests.
|
||||||
|
|
||||||
|
# Follow the Telegraf install instructions (https://docs.influxdata.com/telegraf/v1/install/?t=curl), except for sudo (which isn't available in Docker).
|
||||||
|
RUN apt-get update && apt-get install influxdb2 influxdb2-cli telegraf
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
# Run InfluxDB in the background, wait for it to start, and then test Telegraf.
|
||||||
|
CMD ["-c", "influxd > /var/log/influxd.log 2>&1 & while ! curl -s http://localhost:8086/health | grep -q '\"status\":\"pass\"'; do sleep 1; done; telegraf --config /etc/telegraf/telegraf.conf --test"]
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Function to check if the script is running inside a Docker container
|
||||||
|
is_running_in_docker() {
|
||||||
|
if [ -f /.dockerenv ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -qE '/docker|/lxc' /proc/1/cgroup; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
|
@ -97,8 +97,17 @@ function substitute_placeholders {
|
||||||
|
|
||||||
# v2-specific replacements.
|
# v2-specific replacements.
|
||||||
sed -i 's|https:\/\/us-west-2-1.aws.cloud2.influxdata.com|$INFLUX_HOST|g;
|
sed -i 's|https:\/\/us-west-2-1.aws.cloud2.influxdata.com|$INFLUX_HOST|g;
|
||||||
s|{{< latest-patch >}}|${influxdb_latest_patches_v2}|g;
|
s|influxdb2-{{< latest-patch >}}|influxdb2-${influxdb_latest_patches_v2}|g;
|
||||||
s|{{< latest-patch cli=true >}}|${influxdb_latest_cli_v2}|g;' \
|
s|{{< latest-patch cli=true >}}|${influxdb_latest_cli_v2}|g;
|
||||||
|
s|influxdb2-{{% latest-patch %}}|influxdb2-${influxdb_latest_patches_v2}|g;
|
||||||
|
s|{{% latest-patch cli=true %}}|${influxdb_latest_cli_v2}|g;' \
|
||||||
|
$file
|
||||||
|
|
||||||
|
# Telegraf-specific replacements
|
||||||
|
sed -i 's|telegraf-{{< latest-patch >}}|telegraf-${telegraf_latest_patches_v1}|g;
|
||||||
|
s|telegraf-{{% latest-patch %}}|telegraf-${telegraf_latest_patches_v1}|g;
|
||||||
|
s/--input-filter <INPUT_PLUGIN_NAME>\[:<INPUT_PLUGIN_NAME>\]/--input-filter cpu:influxdb/g;
|
||||||
|
s/--output-filter <OUTPUT_PLUGIN_NAME>\[:<OUTPUT_PLUGIN_NAME>\]/--output-filter influxdb_v2:file/g;' \
|
||||||
$file
|
$file
|
||||||
|
|
||||||
# Skip package manager commands.
|
# Skip package manager commands.
|
||||||
|
@ -107,6 +116,7 @@ function substitute_placeholders {
|
||||||
$file
|
$file
|
||||||
|
|
||||||
# Environment-specific replacements.
|
# Environment-specific replacements.
|
||||||
|
# You can't use sudo with Docker.
|
||||||
sed -i 's|sudo ||g;' \
|
sed -i 's|sudo ||g;' \
|
||||||
$file
|
$file
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue