telegraf
by SVTECH-NMAA
A Helm chart for deploying Telegraf on Kubernetes to collect, process, and forward system, application, and infrastructure metrics to monitoring backends such as InfluxDB, Prometheus, or OpenTelemetry
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
-
Run the following command, providing a name for your Telegraf release:
helm upgrade --install my-release .Tip:
--installcan 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 tohelm upgrade --install. For example:helm upgrade --install my-release \ --set persistence.enabled=true \ .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/telegrafTip: Use the default values.yaml.
Additional Configuration
| Parameter | Description | Default |
|---|---|---|
config.influxdb_host | Define influxdb host (using an FQDN to point to another namespace eg: influxdb.namespace.svc.cluster.local | influxdb-relay |
config.influxdb_port | Define influxdb port | 9096 |
config.influxdb_database | Define influxdb database | influxdb_nms |
config.influxdb_user | Define user access to influxdb database | |
config.influxdb_password | Define password access to influxdb database | |
config.influxdb_skip_database_creation | Set to false if need to create new database | "true" |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the charttelegraf is pinned at v1.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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