summaryrefslogtreecommitdiff
path: root/interface-definitions/system-syslog.xml.in
blob: 6c5f430909c18abe642c8dd2161b44db260a2704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?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>
              <valueHelp>
                <format>txt</format>
                <description>user login name</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 a 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>hostname</format>
                <description>Remote syslog server FQDN</description>
              </valueHelp>
            </properties>
            <children>
              #include <include/port-number.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 (default: 1200)</help>
                      <constraint>
                        <validator name="numeric" argument="--positive"/>
                      </constraint>
                    </properties>
                  </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 (default is 5)</help>
                      <constraint>
                        <regex>[0-9]+</regex>
                      </constraint>
                      <constraintErrorMessage>illegal characters in number of files</constraintErrorMessage>
                    </properties>
                  </leafNode>
                  <leafNode name="size">
                    <properties>
                      <help>Size of log files (in kbytes, default is 256)</help>
                      <constraint>
                        <regex>[0-9]+</regex>
                      </constraint>
                      <constraintErrorMessage>illegal characters in size</constraintErrorMessage>
                    </properties>
                  </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>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>