File: rrdtool-dump.xsd

package info (click to toggle)
rrdtool 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,616 kB
  • ctags: 2,637
  • sloc: ansic: 34,403; sh: 13,388; perl: 1,623; cs: 652; makefile: 524; python: 65; ruby: 61; awk: 30
file content (288 lines) | stat: -rw-r--r-- 11,155 bytes parent folder | download
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
285
286
287
288
<?xml version="1.0" encoding="UTF-8"?>
<!--
	XML schema definition for the RRDTool dump output.

	Author: 
		Tobias Lindenmann <tobias.lindenmann at 1und1.de>
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:ns="http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml" 
	targetNamespace="http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml" 
	elementFormDefault="qualified">
	
	<!-- Root element -->
	<xsd:element name="rrd" type="ns:RrdType">
		<!-- Check datasource name of unique. -->
		<xsd:unique name="Ds.Name">
			<xsd:selector xpath="ns:ds/ns:name"/>
			<xsd:field xpath="."/>
		</xsd:unique>
	</xsd:element>
	
	<!-- Start of complexTypes -->
	<xsd:complexType name="RrdType">
		<xsd:sequence>
			<!-- RRD file version/RRD Archive version number-->
			<xsd:element name="version" type="xsd:nonNegativeInteger"/>
			<!-- The primary RRD Archive step in seconds.-->
			<xsd:element name="step" type="xsd:nonNegativeInteger"/>
			<!-- The unixtime from the last rrd_update.-->
			<xsd:element name="lastupdate" type="xsd:nonNegativeInteger"/>
			<xsd:element name="ds" type="ns:DsType" minOccurs="1" maxOccurs="unbounded"/>
			<!-- Round Robin Archive (rra). This is the place where the
			     consolidated data points (cdp) get stored. The data is
			     organized in rows (row) and columns (col). The Round Robin
			     Archive got its name from the method data is stored in
			     there. An RRD database can contain several Round Robin
			     Archives. Each Round Robin Archive can have a different row
			     spacing along the time axis (pdp_cnt) and a different
			     consolidation function (cf) used to build its consolidated
			     data points (cdp). -->
			<xsd:element name="rra" type="ns:RraType" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="DsType">
		<xsd:sequence>
			<!-- The name of the data source. -->
			<xsd:element name="name" type="ns:DataSourceNameType"/>
			<!-- The Data Source Type (GAUGE, COUNTER, DERIVE, ABSOLUTE, COMPUTE)
			     defines the applied to Build Primary Data Points from the 
			     input provided by the data sources (ds). -->
			<xsd:element name="type" type="ns:DataSourceType"/>
			<!-- Chocie one groups of elements. -->
			<xsd:choice>
				<!-- Group with the elements min,max and heartbeat_min. -->
				<xsd:group ref="ns:Ds.NormalType"/>
				<!-- Group with the element cdef.-->
				<xsd:group ref="ns:Ds.CdefType"/>
			</xsd:choice>
			<xsd:element name="last_ds" type="ns:NumberWithUNKNType"/>
			<!-- Current value of the primary data point, this depends on the data source type. -->
			<xsd:element name="value" type="ns:LexicalNumberWithNaNType"/>
			<!-- How many seconds of the current 
					* pdp value is unknown data?-->
			<xsd:element name="unknown_sec" type="xsd:nonNegativeInteger"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="RraType">
		<xsd:sequence>
			<!-- Consolidation Function (cf). An arbitrary Consolidation Function (cf)
			     (averaging, min, max) is applied to the primary data points (pdp) to
			     calculate the consolidated data point. -->
			<xsd:element name="cf" type="ns:ConsolidationFunctionType"/>
			<xsd:element name="pdp_per_row" type="xsd:nonNegativeInteger"/>
			<xsd:element name="params">
				<!-- Chocie one groups of elements. -->
				<xsd:complexType>
					<xsd:choice>
						<xsd:group ref="ns:Params.HwPredictType"/> 
						<xsd:group ref="ns:Params.SeasonalType"/>
						<xsd:group ref="ns:Params.FailuresType"/>
						<xsd:group ref="ns:Params.DevPredictType"/>
						<xsd:group ref="ns:Params.AvgMinMaxType"/>
					</xsd:choice>
				</xsd:complexType>
			</xsd:element>
			<!-- Data prep area for cdp values -->
			<xsd:element name="cdp_prep" type="ns:CdpPrepType"/>
			<xsd:element name="database" type="ns:DatabaseType"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="DatabaseType">
		<xsd:sequence>
			<xsd:element name="row" type="ns:VType" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="VType">
		<xsd:sequence>
			<xsd:element name="v" type="ns:LexicalNumberWithNaNType" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>	
	</xsd:complexType>

	<xsd:complexType name="CdpPrepType">
		<xsd:sequence>
			<xsd:element name="ds" minOccurs="1" maxOccurs="unbounded">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:group ref="ns:Ds.Cdp"/>
						<!-- Chocie one groups of elements. -->
						<xsd:choice>
							<xsd:group ref="ns:Ds.Cdp.HwPredictType"/>
							<xsd:group ref="ns:Ds.Cdp.SeasonalType"/>
							<xsd:group ref="ns:Ds.Cdp.FailuresType"/>
							<xsd:group ref="ns:Ds.Cdp.AvgMinMaxType"/>
						</xsd:choice>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		 </xsd:sequence>
	</xsd:complexType>
	<!-- End of complexTypes -->

	<!-- Start of groups -->
	<!-- Start of groups for the element rrd/ds. -->
	<xsd:group name="Ds.NormalType">
		<xsd:sequence>
			<!-- Minimum required heartbeat. A
                                     * data source must provide input at
                                     * least every ds_mrhb seconds,
                                     * otherwise it is regarded dead and
                                     * will be set to UNKNOWN -->
			<xsd:element name="minimal_heartbeat" type="xsd:integer"/>
			<!-- Min and max define the expected range values for data supplied by a data source. -->
			<xsd:element name="min" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="max" type="ns:LexicalNumberWithNaNType"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Ds.CdefType">
		<xsd:sequence>
			<xsd:element name="cdef" type="xsd:string"/>
		</xsd:sequence>
	</xsd:group>
	<!-- End of groups for the element rrd/ds. -->
	<!-- Start of groups for the element rrd/rra/cd_prep/ds. -->
	<xsd:group name="Ds.Cdp.HwPredictType">
		<xsd:sequence>
			<xsd:element name="intercept" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="last_intercept" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="slope" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="last_slope" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="nan_count" type="xsd:integer"/>
			<xsd:element name="last_nan_count" type="xsd:integer"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Ds.Cdp.SeasonalType">
		<xsd:sequence>
			<xsd:element name="seasonal" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="last_seasonal" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="init_flag" type="xsd:integer"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Ds.Cdp.FailuresType">
		<xsd:sequence>
			<!-- History failures message.-->
			<xsd:element name="history" type="xsd:string"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Ds.Cdp.AvgMinMaxType">
		<xsd:sequence>
			<xsd:element name="value" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="unknown_datapoints" type="xsd:integer"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Ds.Cdp">
		<xsd:sequence>
			<xsd:element name="primary_value" type="ns:LexicalNumberWithNaNType"/>
			<xsd:element name="secondary_value" type="ns:LexicalNumberWithNaNType"/>
		</xsd:sequence>
	</xsd:group>
	<!-- End of groups for the element cd_prep/ds. -->
	<!-- Start of groups for the element params. -->
	<xsd:group name="Params.HwPredictType">
		<xsd:sequence>
                        <xsd:element name="hw_alpha" type="ns:LexicalNumberType"/>
                        <xsd:element name="hw_beta" type="ns:LexicalNumberType"/>
			<xsd:element name="dependent_rra_idx" type="xsd:integer"/>
		</xsd:sequence>
	</xsd:group>
	
	<xsd:group name="Params.SeasonalType">
		<xsd:sequence>
                        <xsd:element name="seasonal_gamma" type="ns:LexicalNumberType"/>
                        <xsd:element name="seasonal_smooth_idx" type="xsd:integer"/>
			<xsd:element name="smoothing_window" type="ns:LexicalNumberType"/>
			<xsd:element name="dependent_rra_idx" type="xsd:integer"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Params.FailuresType">
		<xsd:sequence>
                        <xsd:element name="delta_pos" type="ns:LexicalNumberType"/>
                        <xsd:element name="delta_neg" type="ns:LexicalNumberType"/>
			<xsd:element name="window_len" type="xsd:integer"/>
			<xsd:element name="failure_threshold" type="xsd:integer"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Params.DevPredictType">
		<xsd:sequence>
			<xsd:element name="dependent_rra_idx" type="xsd:integer"/>
		</xsd:sequence>
	</xsd:group>

	<xsd:group name="Params.AvgMinMaxType">
		<xsd:sequence>
			<!-- The xfiles factor defines what part of a consolidation interval 
			     may be made up from *UNKNOWN* data while the consolidated value
			     is still regarded as known. It is given as the ratio of allowed
			     *UNKNOWN* PDPs to the number of PDPs in the interval. Thus, it 
			     ranges from 0 to 1 (exclusive). -->
			<xsd:element name="xff" type="ns:LexicalNumberType"/>
		</xsd:sequence>
	</xsd:group>
	<!-- End of Groups for the element params. -->
	<!-- End of groups -->
	
	<!-- Start of simpleTypes -->
	<!-- Allowed data source types. -->
	<!-- @see http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html-->
	<xsd:simpleType name="DataSourceType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="GAUGE"/>
			<xsd:enumeration value="COUNTER"/>
			<xsd:enumeration value="DERIVE"/>
			<xsd:enumeration value="ABSOLUTE"/>
			<xsd:enumeration value="COMPUTE"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- A ds-name must be 1 to 19 characters long in the characters [a-zA-Z0-9_]. -->
	<!-- @see http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html-->
	<xsd:simpleType name="DataSourceNameType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[a-zA-Z0-9_]{1,19}"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!-- Allowed consolidation function (cf). -->
	<!-- @see http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html-->
	<xsd:simpleType name="ConsolidationFunctionType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="AVERAGE"/>
			<xsd:enumeration value="MIN"/>
			<xsd:enumeration value="MAX"/>
			<xsd:enumeration value="LAST"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- Allowed a lexical number or the string "NaN".-->
        <xsd:simpleType name="LexicalNumberWithNaNType">
                <xsd:restriction base="xsd:string">
                        <xsd:pattern value="([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?|NaN)"/>
                </xsd:restriction>
        </xsd:simpleType>

	<!-- Allowed only a lexical number. -->
        <xsd:simpleType name="LexicalNumberType">
                <xsd:restriction base="xsd:string">
                        <xsd:pattern value="[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?"/>
                </xsd:restriction>
        </xsd:simpleType>
	
	<!-- Allowed a number or the string "UNKN"  or "U". -->
	<xsd:simpleType name="NumberWithUNKNType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="([\d]+|UNKN|U)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- End of simpleTypes -->
</xsd:schema>