InfluxDB-Telegraf installation with Helm
InfluxDB, Telegraf on Kubernetes
Kubernetes 1.19+
Helm 3.2.0+
A persistent storage resource and RW access to it
Kubernetes StorageClass for dynamic provisioning
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install influxdb bitnami/influxdb \
--create-namespace \
--namespace telegraf \
--set global.storageClass=ceph-block \
--set auth.admin.username=admin \
--set auth.admin.password=password \
--set auth.admin.token=JGivRLzRUSf39AvTnxzUd8 \
--set auth.admin.org=primary \
--set auth.admin.bucket=primary \
--set influxdb.service.type=NodePort \
--set influxdb.service.nodePorts=32073
helm repo add influxdata https://helm.influxdata.com/
helm repo update
cat <<EOF > value-override.yaml
override_config:
toml: |+
[global_tags]
cluster = "openstack-192-168-160-242"
hostname = "$HOSTNAME"
[[inputs.cpu]]
[[inputs.disk]]
[[inputs.mem]]
[[inputs.nvidia_smi]]
[[outputs.influxdb_v2]]
urls = ["http://influxdb.telegraf.svc.cluster.local:8086"]
bucket = "primary"
organization = "primary"
token = "JGivRLzRUSf39AvTnxzUd8"
config:
# global_tags:
# cluster: "openstack-192-168-160-242"
agent:
interval: "10s"
round_interval: false
metric_batch_size: 1000
metric_buffer_limit: 10000
collection_jitter: "0s"
flush_interval: "10s"
flush_jitter: "0s"
precision: ""
outputs:
- influxdb:
urls:
- "http://influxdb.telegraf.svc.cluster.local:8086"
database: "telegraf"
retention_policy: ""
timeout: "5s"
username: ""
password: ""
user_agent: "telegraf"
insecure_skip_verify: false
EOF
helm upgrade --install telegraf-ds influxdata/telegraf-ds \
--create-namespace \
--namespace telegraf \
--set config.docker_endpoint="" \
-f value-override.yaml
(Option) Sample