summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorNicolas Vollmar <nvo@scaling.ch>2024-12-31 16:39:34 +0100
committerGitHub <noreply@github.com>2024-12-31 17:39:34 +0200
commit8f0c2c85ca94f737fe07ccc57a761c0c76148c41 (patch)
tree219b69451e73be1de1d779729cedb0f6ae362030 /interface-definitions
parent6f649d39463d2e56d7cc23debaa9b54486e37cc3 (diff)
downloadvyos-1x-8f0c2c85ca94f737fe07ccc57a761c0c76148c41.tar.gz
vyos-1x-8f0c2c85ca94f737fe07ccc57a761c0c76148c41.zip
T6949: adds blackbox exporter (#4255)
* T6949: adds blackbox exporter * T6949: adds basic config generation * T6949: extract shared module config options * T6949: switch to ipv4/6 literals * T6949: moves config file to /run * T6949: adds dns query name option * T6949: adds dns query type values * T6949: adds blackbox exporter to debian/control
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/monitoring/blackbox-exporter-module-commons.xml.i39
-rw-r--r--interface-definitions/service_monitoring_prometheus.xml.in76
2 files changed, 115 insertions, 0 deletions
diff --git a/interface-definitions/include/monitoring/blackbox-exporter-module-commons.xml.i b/interface-definitions/include/monitoring/blackbox-exporter-module-commons.xml.i
new file mode 100644
index 000000000..a97eb5232
--- /dev/null
+++ b/interface-definitions/include/monitoring/blackbox-exporter-module-commons.xml.i
@@ -0,0 +1,39 @@
+<!-- include start from monitoring/blackbox-module-commons.xml.i -->
+<leafNode name="timeout">
+ <properties>
+ <help>Timeout in seconds for the probe request</help>
+ <valueHelp>
+ <format>u32:1-60</format>
+ <description>Timeout in seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-60"/>
+ </constraint>
+ <constraintErrorMessage>Timeout must be between 1 and 60 seconds</constraintErrorMessage>
+ </properties>
+ <defaultValue>5</defaultValue>
+</leafNode>
+<leafNode name="preferred-ip-protocol">
+ <properties>
+ <help>Preferred IP protocol for this module</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Prefer IPv4</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Prefer IPv6</description>
+ </valueHelp>
+ <constraint>
+ <regex>(ipv4|ipv6)</regex>
+ </constraint>
+ </properties>
+ <defaultValue>ip6</defaultValue>
+</leafNode>
+<leafNode name="ip-protocol-fallback">
+ <properties>
+ <help>Allow fallback to other IP protocol if necessary</help>
+ <valueless/>
+ </properties>
+</leafNode>
+<!-- include end --> \ No newline at end of file
diff --git a/interface-definitions/service_monitoring_prometheus.xml.in b/interface-definitions/service_monitoring_prometheus.xml.in
index 24f31e15c..740900f1f 100644
--- a/interface-definitions/service_monitoring_prometheus.xml.in
+++ b/interface-definitions/service_monitoring_prometheus.xml.in
@@ -36,6 +36,82 @@
#include <include/interface/vrf.xml.i>
</children>
</node>
+ <node name="blackbox-exporter">
+ <properties>
+ <help>Prometheus exporter for probing endpoints</help>
+ </properties>
+ <children>
+ #include <include/listen-address.xml.i>
+ #include <include/port-number.xml.i>
+ <leafNode name="port">
+ <defaultValue>9115</defaultValue>
+ </leafNode>
+ #include <include/interface/vrf.xml.i>
+ <node name="modules">
+ <properties>
+ <help>Configure blackbox exporter modules</help>
+ </properties>
+ <children>
+ <node name="dns">
+ <properties>
+ <help>Configure dns module</help>
+ </properties>
+ <children>
+ <tagNode name="name">
+ <properties>
+ <help>Name of the dns module</help>
+ </properties>
+ <children>
+ <leafNode name="query-name">
+ <properties>
+ <help>Name to be queried</help>
+ <constraint>
+ <validator name="fqdn"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="query-type">
+ <properties>
+ <help>DNS query type</help>
+ <valueHelp>
+ <format>ANY</format>
+ <description>Query any DNS record</description>
+ </valueHelp>
+ <valueHelp>
+ <format>A</format>
+ <description>Query IPv4 address record</description>
+ </valueHelp>
+ <valueHelp>
+ <format>AAAA</format>
+ <description>Query IPv6 address record</description>
+ </valueHelp>
+ </properties>
+ <defaultValue>ANY</defaultValue>
+ </leafNode>
+ #include <include/monitoring/blackbox-exporter-module-commons.xml.i>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ <node name="icmp">
+ <properties>
+ <help>Configure icmp module</help>
+ </properties>
+ <children>
+ <tagNode name="name">
+ <properties>
+ <help>Name of the icmp module</help>
+ </properties>
+ <children>
+ #include <include/monitoring/blackbox-exporter-module-commons.xml.i>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
</children>
</node>
</children>