summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-05-05 16:12:23 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-05-09 08:46:16 +0000
commit749c69b1c8fce968ea9bbf9dec5e2a18ab4a2c6d (patch)
treed3526f99a128b6c5749e98174a57fb085bd93fbd /interface-definitions
parent2c29a3b3b46c7570f4a509f413b208348c0ce647 (diff)
downloadvyos-1x-749c69b1c8fce968ea9bbf9dec5e2a18ab4a2c6d.tar.gz
vyos-1x-749c69b1c8fce968ea9bbf9dec5e2a18ab4a2c6d.zip
monitoring: T4315: Add telegraf output plugin prometheus-client
Add output Plugin "prometheus-client" for telegraf set service monitoring telegraf prometheus-client xxx
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/username.xml.i11
-rw-r--r--interface-definitions/service_monitoring_telegraf.xml.in79
2 files changed, 90 insertions, 0 deletions
diff --git a/interface-definitions/include/username.xml.i b/interface-definitions/include/username.xml.i
new file mode 100644
index 000000000..2263ec08d
--- /dev/null
+++ b/interface-definitions/include/username.xml.i
@@ -0,0 +1,11 @@
+<!-- include start from username.xml.i -->
+<leafNode name="username">
+ <properties>
+ <help>Authentication username</help>
+ <constraint>
+ <regex>^[-_a-zA-Z0-9.]{1,100}</regex>
+ </constraint>
+ <constraintErrorMessage>Illegal characters or more than 100 characters</constraintErrorMessage>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/service_monitoring_telegraf.xml.in b/interface-definitions/service_monitoring_telegraf.xml.in
index 81ba67430..b38e0dd51 100644
--- a/interface-definitions/service_monitoring_telegraf.xml.in
+++ b/interface-definitions/service_monitoring_telegraf.xml.in
@@ -85,6 +85,85 @@
</properties>
<defaultValue>all</defaultValue>
</leafNode>
+ <node name="prometheus-client">
+ <properties>
+ <help>Output plugin Prometheus client</help>
+ </properties>
+ <children>
+ <node name="authentication">
+ <properties>
+ <help>HTTP basic authentication parameters</help>
+ </properties>
+ <children>
+ #include <include/username.xml.i>
+ <leafNode name="password">
+ <properties>
+ <help>Authentication password</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Authentication password</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="allow-from">
+ <properties>
+ <help>Networks allowed to query this server</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>IP address and prefix length</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>IPv6 address and prefix length</description>
+ </valueHelp>
+ <multi/>
+ <constraint>
+ <validator name="ip-prefix"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="listen-address">
+ <properties>
+ <help>Local IP addresses to listen on</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_local_ips.sh --both</script>
+ </completionHelp>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 address to listen for incoming connections</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>IPv6 address to listen for incoming connections</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ipv6-address"/>
+ <validator name="ipv6-link-local"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="metric-version">
+ <properties>
+ <help>Metric version control mapping from Telegraf to Prometheus format</help>
+ <valueHelp>
+ <format>u32:1-2</format>
+ <description>Metric version (default: 2)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-2"/>
+ </constraint>
+ </properties>
+ <defaultValue>2</defaultValue>
+ </leafNode>
+ #include <include/port-number.xml.i>
+ <leafNode name="port">
+ <defaultValue>9273</defaultValue>
+ </leafNode>
+ </children>
+ </node>
<leafNode name="url">
<properties>
<help>Remote URL [REQUIRED]</help>