Skip to content

Commit

Permalink
Create telegrafStreamConfig.yaml
Browse files Browse the repository at this point in the history
config for second telegraf to stream live data to grafana
  • Loading branch information
cfoos authored Sep 29, 2024
1 parent 451a6bd commit e118504
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions tools/k3s/telegrafStreamConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---

apiVersion: v1
kind: ConfigMap
metadata:
name: telegrafstream
namespace: powerwall
labels:
app: telegrafstream
data:
telegraf.conf: |+
[global_tags]
[agent]
interval = "5s"
round_interval = true
metric_batch_size = 360
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
[[outputs.influxdb]]
[[outputs.websocket]]
url = "ws://grafana.powerwall:3000/api/live/push/powerwall_stream"
data_format = "influx"
influx_sort_fields = true
influx_uint_support = true
[outputs.websocket.headers]
Authorization = "Bearer <api token>"
[[inputs.http]]
urls = [
"http://pypowerwall.powerwall:8675/aggregates",
]
method = "GET"
insecure_skip_verify = true
timeout = "4s"
data_format = "json"
[[processors.date]]
tag_key = "month"
date_format = "Jan"
timezone = "America/Chicago"
[[processors.date]]
tag_key = "year"
date_format = "2006"
timezone = "America/Chicago"
[[inputs.http]]
[[inputs.cpu]]
[[inputs.disk]]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.swap]]
[[inputs.system]]
[[inputs.kubernetes]]
[[inputs.kube_inventory]]

0 comments on commit e118504

Please sign in to comment.