summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorDate Huang <tjjh89017@hotmail.com>2026-07-16 19:46:02 +0800
committerDate Huang <tjjh89017@hotmail.com>2026-07-16 19:46:02 +0800
commiteb6ae2a8bc2906181a8b8130d9c225f7def7bfa8 (patch)
treecd10543a780ec6241c96a89cd60f5ef5381877e1 /interface-definitions
parent80e1764619b2aa11df69d351a8f149e6784cce10 (diff)
downloadvyos-1x-eb6ae2a8bc2906181a8b8130d9c225f7def7bfa8.tar.gz
vyos-1x-eb6ae2a8bc2906181a8b8130d9c225f7def7bfa8.zip
T9073: frr-exporter: add CLI support for optional collectors and collector options
frr_exporter v1.5.0 enables the bgp, ospf, bfd and route collectors by default, while bgpl2vpn, pim and vrrp must be enabled explicitly. Expose bgpl2vpn (CLI: bgp-l2-vpn) and pim under "service monitoring prometheus frr-exporter collector", following the same CLI style as the node-exporter collectors node. The vrrp collector is not exposed since VyOS implements VRRP with keepalived and FRR's vrrpd is never started. Also expose the collector options available in v1.5.0: - collector bgp accept-filtered-prefixes - collector bgp advertised-prefixes - collector bgp peer-description <json|plain-text> - collector bgp peer-group - collector bgp peer-hostname - collector bgp peer-type - collector ospf-instance <id> - collector detailed-routes The bgp.* options are shared by the bgp, bgp6 and bgpl2vpn collectors upstream. The bgp6 collector remains unconditionally enabled, hence existing configurations render the same ExecStart and no migration is required. Includes code generated by Claude Code
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/service_monitoring_prometheus.xml.in95
1 files changed, 95 insertions, 0 deletions
diff --git a/interface-definitions/service_monitoring_prometheus.xml.in b/interface-definitions/service_monitoring_prometheus.xml.in
index 8bcebf5f3..4443fde3a 100644
--- a/interface-definitions/service_monitoring_prometheus.xml.in
+++ b/interface-definitions/service_monitoring_prometheus.xml.in
@@ -47,6 +47,101 @@
<defaultValue>9342</defaultValue>
</leafNode>
#include <include/interface/vrf.xml.i>
+ <node name="collector">
+ <properties>
+ <help>Collector specific configuration</help>
+ </properties>
+ <children>
+ <node name="bgp">
+ <properties>
+ <help>BGP collector specific options</help>
+ </properties>
+ <children>
+ <leafNode name="accept-filtered-prefixes">
+ <properties>
+ <help>Enable retrieval of accepted and filtered BGP prefix counts</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="advertised-prefixes">
+ <properties>
+ <help>Enable count of advertised prefixes to a BGP peer (for FRR versions without PfxSnt field)</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="peer-description">
+ <properties>
+ <help>Add the BGP peer description as a label to peer metrics</help>
+ <completionHelp>
+ <list>json plain-text</list>
+ </completionHelp>
+ <valueHelp>
+ <format>json</format>
+ <description>Use the value of the desc key from the JSON formatted BGP peer description</description>
+ </valueHelp>
+ <valueHelp>
+ <format>plain-text</format>
+ <description>Use the full text of the BGP peer description</description>
+ </valueHelp>
+ <constraint>
+ <regex>(json|plain-text)</regex>
+ </constraint>
+ </properties>
+ <defaultValue>json</defaultValue>
+ </leafNode>
+ <leafNode name="peer-group">
+ <properties>
+ <help>Add the peer group name of the BGP peer as a label to peer metrics</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="peer-hostname">
+ <properties>
+ <help>Add the hostname of the BGP peer as a label to peer metrics</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="peer-type">
+ <properties>
+ <help>Enable metrics for the number of established BGP peers per type, defined by the type key in the JSON formatted peer description</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="bgp-l2-vpn">
+ <properties>
+ <help>Enable BGP L2VPN collector</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="ospf-instance">
+ <properties>
+ <help>OSPF instance ID when using multiple OSPF instances</help>
+ <valueHelp>
+ <format>u32:1-65535</format>
+ <description>OSPF instance ID</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ <multi/>
+ </properties>
+ </leafNode>
+ <leafNode name="pim">
+ <properties>
+ <help>Enable PIM collector</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="detailed-routes">
+ <properties>
+ <help>Enable detailed route count of each route type</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
</children>
</node>
<node name="blackbox-exporter">