summaryrefslogtreecommitdiff
path: root/interface-definitions/service_monitoring_telegraf.xml.in
blob: 4d694114a1a345a3648fd94c2280ca43179b4e70 (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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<?xml version="1.0"?>
<interfaceDefinition>
  <node name="service">
    <children>
      <node name="monitoring">
        <properties>
          <help>Monitoring services</help>
          <priority>1280</priority>
        </properties>
        <children>
          <node name="telegraf" owner="${vyos_conf_scripts_dir}/service_monitoring_telegraf.py">
            <properties>
              <help>Telegraf metric collector</help>
            </properties>
            <children>
              <node name="influxdb">
                <properties>
                  <help>Output plugin InfluxDB</help>
                </properties>
                <children>
                  <node name="authentication">
                    <properties>
                      <help>Authentication parameters</help>
                    </properties>
                    <children>
                      <leafNode name="organization">
                        <properties>
                          <help>Authentication organization for InfluxDB v2</help>
                          <constraint>
                            <regex>[a-zA-Z][1-9a-zA-Z@_\-.]{2,50}</regex>
                          </constraint>
                          <constraintErrorMessage>Organization name must be alphanumeric and can contain hyphens, underscores and at symbol.</constraintErrorMessage>
                        </properties>
                      </leafNode>
                      <leafNode name="token">
                        <properties>
                          <help>Authentication token for InfluxDB v2</help>
                          <valueHelp>
                            <format>txt</format>
                            <description>Authentication token</description>
                          </valueHelp>
                          <constraint>
                            <regex>[a-zA-Z0-9-_]{86}==</regex>
                          </constraint>
                          <constraintErrorMessage>Token must be 88 characters long and must contain only [a-zA-Z0-9-_] and '==' characters.</constraintErrorMessage>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <leafNode name="bucket">
                    <properties>
                      <help>Remote bucket</help>
                    </properties>
                    <defaultValue>main</defaultValue>
                  </leafNode>
                  #include <include/url-http-https.xml.i>
                  #include <include/port-number.xml.i>
                  <leafNode name="port">
                    <defaultValue>8086</defaultValue>
                  </leafNode>
                </children>
              </node>
              <node name="azure-data-explorer">
                <properties>
                  <help>Output plugin Azure Data Explorer</help>
                </properties>
                <children>
                  <node name="authentication">
                    <properties>
                      <help>Authentication parameters</help>
                    </properties>
                    <children>
                      <leafNode name="client-id">
                        <properties>
                          <help>Application client id</help>
                          <constraint>
                            #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
                          </constraint>
                          <constraintErrorMessage>Client-id is limited to alphanumerical characters and can contain hyphen and underscores</constraintErrorMessage>
                        </properties>
                      </leafNode>
                      <leafNode name="client-secret">
                        <properties>
                          <help>Application client secret</help>
                          <constraint>
                            #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
                          </constraint>
                          <constraintErrorMessage>Client-secret is limited to alphanumerical characters and can contain hyphen and underscores</constraintErrorMessage>
                        </properties>
                      </leafNode>
                      <leafNode name="tenant-id">
                        <properties>
                          <help>Set tenant id</help>
                          <constraint>
                            #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
                          </constraint>
                          <constraintErrorMessage>Tenant-id is limited to alphanumerical characters and can contain hyphen and underscores</constraintErrorMessage>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <leafNode name="database">
                    <properties>
                      <help>Remote database name</help>
                      <valueHelp>
                        <format>txt</format>
                        <description>Remote database name</description>
                      </valueHelp>
                      <constraint>
                        #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
                      </constraint>
                      <constraintErrorMessage>Database is limited to alphanumerical characters and can contain hyphen and underscores</constraintErrorMessage>
                    </properties>
                  </leafNode>
                  <leafNode name="group-metrics">
                    <properties>
                      <help>Type of metrics grouping when push to Azure Data Explorer</help>
                      <completionHelp>
                        <list>single-table table-per-metric</list>
                      </completionHelp>
                      <valueHelp>
                        <format>single-table</format>
                        <description>Metrics stores in one table</description>
                      </valueHelp>
                      <valueHelp>
                        <format>table-per-metric</format>
                        <description>One table per gorups of metric by the metric name</description>
                      </valueHelp>
                      <constraint>
                        <regex>(single-table|table-per-metric)</regex>
                      </constraint>
                    </properties>
                    <defaultValue>table-per-metric</defaultValue>
                  </leafNode>
                  <leafNode name="table">
                    <properties>
                      <help>Name of the single table [Only if set group-metrics single-table]</help>
                      <valueHelp>
                        <format>txt</format>
                        <description>Table name</description>
                      </valueHelp>
                      <constraint>
                        #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
                      </constraint>
                      <constraintErrorMessage>Table is limited to alphanumerical characters and can contain hyphen and underscores</constraintErrorMessage>
                    </properties>
                  </leafNode>
                  #include <include/url-http-https.xml.i>
                </children>
              </node>
              <leafNode name="source">
                <properties>
                  <help>Source parameters for monitoring</help>
                  <completionHelp>
                    <list>all hardware-utilization logs network system telegraf</list>
                  </completionHelp>
                  <valueHelp>
                    <format>all</format>
                    <description>All parameters</description>
                  </valueHelp>
                  <valueHelp>
                    <format>hardware-utilization</format>
                    <description>Hardware-utilization parameters (CPU, disk, memory)</description>
                  </valueHelp>
                  <valueHelp>
                    <format>logs</format>
                    <description>Logs parameters</description>
                  </valueHelp>
                  <valueHelp>
                    <format>network</format>
                    <description>Network parameters (net, netstat, nftables)</description>
                  </valueHelp>
                  <valueHelp>
                    <format>system</format>
                    <description>System parameters (system, processes, interrupts)</description>
                  </valueHelp>
                  <valueHelp>
                    <format>telegraf</format>
                    <description>Telegraf internal statistics</description>
                  </valueHelp>
                  <constraint>
                    <regex>(all|hardware-utilization|logs|network|system|telegraf)</regex>
                  </constraint>
                  <multi/>
                </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>
                      <leafNode name="username">
                        <properties>
                          <help>Authentication username</help>
                        </properties>
                      </leafNode>
                      <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>
                  #include <include/listen-address-single.xml.i>
                  <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>
              <node name="splunk">
                <properties>
                  <help>Output plugin Splunk</help>
                </properties>
                <children>
                  <node name="authentication">
                    <properties>
                      <help>HTTP basic authentication parameters</help>
                    </properties>
                    <children>
                      <leafNode name="token">
                        <properties>
                          <help>Authorization token</help>
                        </properties>
                      </leafNode>
                      <leafNode name="insecure">
                        <properties>
                          <help>Use TLS but skip host validation</help>
                          <valueless/>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  #include <include/url-http-https.xml.i>
                </children>
              </node>
              #include <include/interface/vrf.xml.i>
            </children>
          </node>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>