summaryrefslogtreecommitdiff
path: root/interface-definitions/system_syslog.xml.in
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-30 23:25:20 +0100
committerChristian Breunig <christian@breunig.cc>2024-01-01 09:25:32 +0100
commitc9eaafd9f808aba8d29be73054e11d37577e539a (patch)
treeaeccfda0a305cf6aca41630900e75bd32961a911 /interface-definitions/system_syslog.xml.in
parent2078253176046ea4d07e69caeb7932ea439b5614 (diff)
downloadvyos-1x-c9eaafd9f808aba8d29be73054e11d37577e539a.tar.gz
vyos-1x-c9eaafd9f808aba8d29be73054e11d37577e539a.zip
T5474: establish common file name pattern for XML conf mode commands
We will use _ as CLI level divider. The XML definition filename and also the Python helper should match the CLI node. Example: set interfaces ethernet -> interfaces_ethernet.xml.in set interfaces bond -> interfaces_bond.xml.in set service dhcp-server -> service_dhcp-server-xml.in (cherry picked from commit 4ef110fd2c501b718344c72d495ad7e16d2bd465)
Diffstat (limited to 'interface-definitions/system_syslog.xml.in')
-rw-r--r--interface-definitions/system_syslog.xml.in155
1 files changed, 155 insertions, 0 deletions
diff --git a/interface-definitions/system_syslog.xml.in b/interface-definitions/system_syslog.xml.in
new file mode 100644
index 000000000..3343e2c59
--- /dev/null
+++ b/interface-definitions/system_syslog.xml.in
@@ -0,0 +1,155 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="system">
+ <children>
+ <node name="syslog" owner="${vyos_conf_scripts_dir}/system_syslog.py">
+ <properties>
+ <help>System logging</help>
+ <priority>400</priority>
+ </properties>
+ <children>
+ <tagNode name="user">
+ <properties>
+ <help>Logging to specific terminal of given user</help>
+ <completionHelp>
+ <path>system login user</path>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Local user account</description>
+ </valueHelp>
+ <constraint>
+ #include <include/constraint/login-username.xml.i>
+ </constraint>
+ <constraintErrorMessage>illegal characters in user</constraintErrorMessage>
+ </properties>
+ <children>
+ #include <include/syslog-facility.xml.i>
+ </children>
+ </tagNode>
+ <tagNode name="host">
+ <properties>
+ <help>Logging to remote host</help>
+ <constraint>
+ <validator name="ip-address"/>
+ <validator name="fqdn"/>
+ </constraint>
+ <constraintErrorMessage>Invalid host (FQDN or IP address)</constraintErrorMessage>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Remote syslog server IPv4 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Remote syslog server IPv6 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>hostname</format>
+ <description>Remote syslog server FQDN</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/port-number.xml.i>
+ <leafNode name="port">
+ <defaultValue>514</defaultValue>
+ </leafNode>
+ #include <include/protocol-tcp-udp.xml.i>
+ #include <include/syslog-facility.xml.i>
+ <node name="format">
+ <properties>
+ <help>Logging format</help>
+ </properties>
+ <children>
+ <leafNode name="octet-counted">
+ <properties>
+ <help>Allows for the transmission of all characters inside a syslog message</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </tagNode>
+ <node name="global">
+ <properties>
+ <help>Logging to system standard location</help>
+ </properties>
+ <children>
+ #include <include/syslog-facility.xml.i>
+ <node name="marker">
+ <properties>
+ <help>mark messages sent to syslog</help>
+ </properties>
+ <children>
+ <leafNode name="interval">
+ <properties>
+ <help>time interval how often a mark message is being sent in seconds</help>
+ <constraint>
+ <validator name="numeric" argument="--positive"/>
+ </constraint>
+ </properties>
+ <defaultValue>1200</defaultValue>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="preserve-fqdn">
+ <properties>
+ <help>uses FQDN for logging</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="file">
+ <properties>
+ <help>Logging to a file</help>
+ <constraint>
+ <regex>[a-zA-Z0-9\-_.]{1,255}</regex>
+ </constraint>
+ <constraintErrorMessage>illegal characters in filename or filename longer than 255 characters</constraintErrorMessage>
+ </properties>
+ <children>
+ <node name="archive">
+ <properties>
+ <help>Log file size and rotation characteristics</help>
+ </properties>
+ <children>
+ <leafNode name="file">
+ <properties>
+ <help>Number of saved files</help>
+ <constraint>
+ <regex>[0-9]+</regex>
+ </constraint>
+ <constraintErrorMessage>illegal characters in number of files</constraintErrorMessage>
+ </properties>
+ <defaultValue>5</defaultValue>
+ </leafNode>
+ <leafNode name="size">
+ <properties>
+ <help>Size of log files in kbytes</help>
+ <constraint>
+ <regex>[0-9]+</regex>
+ </constraint>
+ <constraintErrorMessage>illegal characters in size</constraintErrorMessage>
+ </properties>
+ <defaultValue>256</defaultValue>
+ </leafNode>
+ </children>
+ </node>
+ #include <include/syslog-facility.xml.i>
+ </children>
+ </tagNode>
+ <node name="console">
+ <properties>
+ <help>logging to serial console</help>
+ </properties>
+ <children>
+ #include <include/syslog-facility.xml.i>
+ </children>
+ </node>
+ #include <include/interface/vrf.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>