diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-10-13 16:45:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 16:45:03 +0300 |
commit | ae975a29418a17871529573b9cc87089eecdd296 (patch) | |
tree | e6497ff198951c0ba922f65e52228cb7b148fa5e | |
parent | f54f1387c7e50e108b3bfaeab2331b845cca25fc (diff) | |
parent | 72c7547efce6051edc9a6c14083cf56a5368836a (diff) | |
download | vyos-1x-ae975a29418a17871529573b9cc87089eecdd296.tar.gz vyos-1x-ae975a29418a17871529573b9cc87089eecdd296.zip |
Merge pull request #1593 from sever-sever/T4312-eq
monitoring: T4312: Ability to set IP address in the URL
-rw-r--r-- | interface-definitions/include/url.xml.i | 15 | ||||
-rw-r--r-- | interface-definitions/service_monitoring_telegraf.xml.in | 14 |
2 files changed, 16 insertions, 13 deletions
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> |