diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-04-11 09:02:08 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-04-11 09:02:08 +0000 |
commit | 2179cf45d606d23abfcb96c000db5c9316c48a59 (patch) | |
tree | 892ad42fdd8f142529dda7da1349b5cb3b6a32b1 /data/templates | |
parent | c5cd065773a0ce5b2b9e94ae6c79a72b805832a6 (diff) | |
download | vyos-1x-2179cf45d606d23abfcb96c000db5c9316c48a59.tar.gz vyos-1x-2179cf45d606d23abfcb96c000db5c9316c48a59.zip |
T5152: Get default hostname for telegraf from FQDN or hostname
Fix for Telegraf agent hostname isn't qualified
Try to get hostname from FQDN and then from hostname
Used for metrics
You may have more than one machine with different domain names
r1 domain-name foo.local, hostname myhost
r2 domain-name bar.local, hostname myhost
It helps to detect from which exectly host we get metric for
InfluxDB2
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/telegraf/telegraf.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/telegraf/telegraf.j2 b/data/templates/telegraf/telegraf.j2 index c9f402281..5852d6232 100644 --- a/data/templates/telegraf/telegraf.j2 +++ b/data/templates/telegraf/telegraf.j2 @@ -12,7 +12,7 @@ debug = false quiet = false logfile = "" - hostname = "" + hostname = "{{ hostname }}" omit_hostname = false {% if azure_data_explorer is vyos_defined %} ### Azure Data Explorer ### |