summaryrefslogtreecommitdiff
path: root/interface-definitions/service_monitoring_telegraf.xml.in
blob: 021174701a968d9e7d42853adf6f5100ce0c59db (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
<?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 monitoring</help>
            </properties>
            <children>
              <node name="authentication">
                <properties>
                  <help>Authentication parameters</help>
                </properties>
                <children>
                  <leafNode name="organization">
                    <properties>
                      <help>Authentication organization for InfluxDB v2 [REQUIRED]</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 [REQUIRED]</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>
              <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>
                  <leafNode name="listen-address">
                    <properties>
                      <help>Local IP addresses to listen on</help>
                      <completionHelp>
                        <script>${vyos_completion_dir}/list_local_ips.sh --both</script>
                      </completionHelp>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>IPv4 address to listen for incoming connections</description>
                      </valueHelp>
                      <valueHelp>
                        <format>ipv6</format>
                        <description>IPv6 address to listen for incoming connections</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                        <validator name="ipv6-address"/>
                        <validator name="ipv6-link-local"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <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>
              <leafNode name="url">
                <properties>
                  <help>Remote URL [REQUIRED]</help>
                  <valueHelp>
                    <format>url</format>
                    <description>Remote URL to InfluxDB v2</description>
                  </valueHelp>
                  <constraint>
                    <regex>(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}?(\/.*)?</regex>
                  </constraint>
                  <constraintErrorMessage>Incorrect URL format.</constraintErrorMessage>
                </properties>
              </leafNode>
              #include <include/port-number.xml.i>
              <leafNode name="port">
                <defaultValue>8086</defaultValue>
              </leafNode>
            </children>
          </node>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>