summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/conntrackd/conntrackd.conf.tmpl4
-rw-r--r--data/templates/monitoring/telegraf.tmpl2
-rw-r--r--interface-definitions/include/url.xml.i15
-rw-r--r--interface-definitions/service_monitoring_telegraf.xml.in14
4 files changed, 20 insertions, 15 deletions
diff --git a/data/templates/conntrackd/conntrackd.conf.tmpl b/data/templates/conntrackd/conntrackd.conf.tmpl
index ff6f785d5..7ec8a727c 100644
--- a/data/templates/conntrackd/conntrackd.conf.tmpl
+++ b/data/templates/conntrackd/conntrackd.conf.tmpl
@@ -10,7 +10,9 @@ Sync {
{% if iface_config.peer is defined and iface_config.peer is not none %}
UDP {
{% if listen_address is defined and listen_address is not none %}
- IPv4_address {{ listen_address }}
+{% for address in listen_address %}
+ IPv4_address {{ address }}
+{% endfor %}
{% endif %}
IPv4_Destination_Address {{ iface_config.peer }}
Port {{ iface_config.port if iface_config.port is defined else '3780' }}
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 %}
diff --git a/interface-definitions/include/url.xml.i b/interface-definitions/include/url.xml.i
new file mode 100644
index 000000000..caa6f67bd
--- /dev/null
+++ b/interface-definitions/include/url.xml.i
@@ -0,0 +1,15 @@
+<!-- include start from url.xml.i -->
+<leafNode name="url">
+ <properties>
+ <help>Remote URL</help>
+ <valueHelp>
+ <format>url</format>
+ <description>Remote URL</description>
+ </valueHelp>
+ <constraint>
+ <regex>^https?:\/\/?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\:[0-9]+)*(\/.*)?</regex>
+ </constraint>
+ <constraintErrorMessage>Incorrect URL format</constraintErrorMessage>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/service_monitoring_telegraf.xml.in b/interface-definitions/service_monitoring_telegraf.xml.in
index b38e0dd51..8a6b31d8c 100644
--- a/interface-definitions/service_monitoring_telegraf.xml.in
+++ b/interface-definitions/service_monitoring_telegraf.xml.in
@@ -164,19 +164,7 @@
</leafNode>
</children>
</node>
- <leafNode name="url">
- <properties>
- <help>Remote URL [REQUIRED]</help>
- <valueHelp>
- <format>url</format>
- <description>Remote URL to InfluxDB v2</description>
- </valueHelp>
- <constraint>
- <regex>^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}?(\/.*)?$</regex>
- </constraint>
- <constraintErrorMessage>Incorrect URL format.</constraintErrorMessage>
- </properties>
- </leafNode>
+ #include <include/url.xml.i>
#include <include/port-number.xml.i>
<leafNode name="port">
<defaultValue>8086</defaultValue>