diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-10-11 17:54:01 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-10-11 17:54:01 +0000 |
commit | b4c2d288b0987a453568c9a98b6b615f52da41c1 (patch) | |
tree | 6549af39b24601e9b6577b60987b34ea4357e295 | |
parent | 8560c1cc38f9104fe0d12fe72e0312c52afa9c08 (diff) | |
download | vyos-1x-b4c2d288b0987a453568c9a98b6b615f52da41c1.tar.gz vyos-1x-b4c2d288b0987a453568c9a98b6b615f52da41c1.zip |
monitoring: T4680: Bracketize prometheus listen-address
Fix correct format for prometheus listen-address when we use
IPv6 address, we must use square 'brackets'
http://[2001:db8::11e]:9273
-rw-r--r-- | data/templates/monitoring/telegraf.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/monitoring/telegraf.tmpl b/data/templates/monitoring/telegraf.tmpl index f80dc5f45..c5cbddc8c 100644 --- a/data/templates/monitoring/telegraf.tmpl +++ b/data/templates/monitoring/telegraf.tmpl @@ -25,7 +25,7 @@ {% if prometheus_client is defined %} [[outputs.prometheus_client]] ## Address to listen on - listen = "{{ prometheus_client.listen_address if prometheus_client.listen_address is defined else '' }}:{{ prometheus_client.port }}" + listen = "{{ prometheus_client.listen_address | bracketize_ipv6 if prometheus_client.listen_address is defined else '' }}:{{ prometheus_client.port }}" metric_version = {{ prometheus_client.metric_version }} {% if prometheus_client.authentication is defined %} {% if prometheus_client.authentication.username is defined and prometheus_client.authentication.username is not none and prometheus_client.authentication.password is defined and prometheus_client.authentication.password is not none %} |