telegraf

by Helm

Helm chartv1.8.79App 1.40.4

Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.

About this chart

Telegraf Helm chart

Telegraf is a plugin-driven server agent used for collecting and reporting metrics.

The Telegraf Helm chart uses the Helm package manager to bootstrap a Telegraf (telegraf) deployment on a Kubernetes cluster.

To see a list of available Telegraf plugins, see https://github.com/influxdata/telegraf/tree/master/plugins/.

Prerequisites

  • Helm v2 or later
  • Kubernetes 1.4+ with beta APIs enabled

Install the chart

  1. Add the InfluxData Helm repository:

    helm repo add influxdata https://helm.influxdata.com/
    
  2. Run the following command, providing a name for your Telegraf release:

    helm upgrade --install my-release influxdata/telegraf
    

    Tip: --install can be shortened to -i.

    This command deploys Telegraf on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see Configure the chart.

Tip: To view all Helm chart releases, run helm list.

Uninstall the chart

To uninstall the my-release deployment, use the following command:

helm uninstall my-release

This command removes all Kubernetes components associated with the chart and deletes the release.

Configure the chart

Plugins are configured as arrays of key/value dictionaries. Find configurable parameters, their descriptions, and their default values stored in values.yaml.

To configure the chart, do either of the following:

  • Specify each parameter using the --set key=value[,key=value] argument to helm upgrade --install. For example:

    helm upgrade --install my-release \
      --set persistence.enabled=true \
        influxdata/telegraf
    

    This command enables persistence.

  • Provide a YAML file that specifies the parameter values while installing the chart. For example, use the following command:

    helm upgrade --install my-release -f values.yaml influxdata/telegraf
    

    Tip: Use the default values.yaml.

Telegraf configuration

Telegraf configuration is generated by YAML to TOML conversion of .Values.config entry. In some rare cases, Telegraf may not be able to parse the generated file.

There is an alternative config conversion template that may produce better results. To use it, set tplVersion value to 2 when installing/upgrading the chart:

helm upgrade --install my-release --set tplVersion=2 influxdata/telegraf

Please note this is experimental feature.

Deploy telegraf with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has telegraf on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charttelegraf is pinned at v1.8.79 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply