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 289 290 291 292 293 294 295 296 297 298
|
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="patterndb">
<xs:complexType>
<xs:sequence>
<xs:element name="ruleset" type="rulesetType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
A container to group log patterns for an application/program.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:NMTOKEN" use="required" fixed="3">
<xs:annotation>
<xs:documentation>
The schema version of the pattern database.
The current version is '3'.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="pub_date" type="xs:date" use="required">
<xs:annotation>
<xs:documentation>
The publication date of the XML file.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:unique name="ruleset_name">
<xs:selector xpath="ruleset"/>
<xs:field xpath="@name"/>
</xs:unique>
<xs:unique name="ids">
<xs:selector xpath=".//*"/>
<xs:field xpath="@id"/>
</xs:unique>
</xs:element>
<xs:complexType name="rulesetType">
<xs:all>
<xs:element name="description" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
An optional element to attach description to a ruleset.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="url" type="xs:anyURI" minOccurs="0">
<xs:annotation>
<xs:documentation>
An optional element to point to a URL related to the ruleset.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="pattern" type="patternType" minOccurs="0">
<xs:annotation>
<xs:documentation>
An optional element with a pattern representing the name of the application related
to the ruleset in the syslog program field.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="rules">
<xs:annotation>
<xs:documentation>
The rules in the ruleset.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="rule" type="ruleType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
A rule describes one log event with classifications and details.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="patterns">
<xs:selector xpath="rule/patterns/pattern"/>
<xs:field xpath="."/>
</xs:unique>
</xs:element>
</xs:all>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The name of the application.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="ruleType">
<xs:all>
<xs:element name="description" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
An optional element to describe the log disposition.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="urls" minOccurs="0">
<xs:annotation>
<xs:documentation>
Optional elements to point to some external resource for disposition.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="url" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="urls">
<xs:selector xpath="url"/>
<xs:field xpath="."/>
</xs:unique>
</xs:element>
<xs:element name="values" minOccurs="0">
<xs:annotation>
<xs:documentation>
Optional values that are added after template evaluation to messages
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="value" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="values">
<xs:selector xpath="value"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:element name="examples" minOccurs="0">
<xs:annotation>
<xs:documentation>
Optional examples to test rule patterns and configuration
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="example" type="exampleType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="examples">
<xs:selector xpath="example"/>
<xs:field xpath="test_message"/>
</xs:unique>
</xs:element>
<xs:element name="tags" minOccurs="0">
<xs:annotation>
<xs:documentation>
Optional keywords that can be used for a freeform grouping of the rules.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="tag" type="xs:token" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="tags">
<xs:selector xpath="tag"/>
<xs:field xpath="."/>
</xs:unique>
</xs:element>
<xs:element name="patterns">
<xs:annotation>
<xs:documentation>
Patterns representing the rule. Log messages matching any one of the patterns
are classified to this rule.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="pattern" type="patternType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
A pattern representing the log message.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="provider" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The provider of the rule. To distinguish between who supplied the rule,
or if it has been added to the xml by a local user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="class" type="classType" use="required">
<xs:annotation>
<xs:documentation>
The class of the rule.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="uuidType">
<xs:annotation>
<xs:documentation>
This describes a UUID syntax. Currently it is not used for
the IDing to avoid enforcing the use of UUIDs, which some
users complained about. Once the decision on the rule id
format happens this may completely be removed.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="patternType">
<xs:annotation>
<xs:documentation>
This type describes a radix/parser pattern which is used to match
a program name or a whole log message.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="classType">
<xs:annotation>
<xs:documentation>
The classification class for a single rule.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[\-a-zA-Z0-9_\.%:@\+!\^\\/]+"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="exampleType">
<xs:all>
<xs:element name="test_message">
<xs:annotation>
<xs:documentation>
The example message to test rule patterns
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="program" type="xs:string" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="test_values" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="test_value" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="test-values">
<xs:selector xpath="test_value"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:element name="test_tags" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="test_tag" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:schema>
|