summaryrefslogtreecommitdiff
path: root/data/templates/telegraf/telegraf.j2
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-06-28 14:51:02 +0200
committerGitHub <noreply@github.com>2024-06-28 14:51:02 +0200
commit551dfa5c47d19b62fbfba5e26e357f93546ff4d8 (patch)
treef78557aa332e3107ec4819679b23b090a0632491 /data/templates/telegraf/telegraf.j2
parent2c4e778cb460b66106e91d2cb68502da92e94c06 (diff)
parent362a810c001c94910230e8e19d483f94c724703a (diff)
downloadvyos-1x-551dfa5c47d19b62fbfba5e26e357f93546ff4d8.tar.gz
vyos-1x-551dfa5c47d19b62fbfba5e26e357f93546ff4d8.zip
Merge pull request #3739 from vyos/mergify/bp/circinus/pr-3720
T6477: Add telegraf loki output plugin (backport #3720)
Diffstat (limited to 'data/templates/telegraf/telegraf.j2')
-rw-r--r--data/templates/telegraf/telegraf.j215
1 files changed, 15 insertions, 0 deletions
diff --git a/data/templates/telegraf/telegraf.j2 b/data/templates/telegraf/telegraf.j2
index 9623bdec6..f382dbf2e 100644
--- a/data/templates/telegraf/telegraf.j2
+++ b/data/templates/telegraf/telegraf.j2
@@ -41,6 +41,21 @@
bucket = "{{ influxdb.bucket }}"
### End InfluxDB2 ###
{% endif %}
+{% if loki is vyos_defined %}
+### Loki ###
+[[outputs.loki]]
+ ## The domain of Loki
+ domain = "{{ loki.url }}:{{ loki.port }}"
+{% if loki.authentication.username is vyos_defined and loki.authentication.password is vyos_defined %}
+ ## Basic Authentication
+ username = "{{ loki.authentication.username }}"
+ password = "{{ loki.authentication.password }}"
+{% endif %}
+{% if loki.metric_name_label is vyos_defined %}
+metric_name_label = "{{ loki.metric_name_label }}"
+{% endif %}
+### End Loki ###
+{% endif %}
{% if prometheus_client is vyos_defined %}
### Prometheus ###
[[outputs.prometheus_client]]