Webob Status XML Reference| This reference describes the format of Webob's native "status xml" format. The XML can be
transformed with XSLT stylesheets or integrated into any system that can understand XML.
If you are new to Webob, we strongly suggest you first check out the Webob Quickstart Tutorial. |
|
The root item for webob status.
|
| Children | resource type="url/process/file" resource type="perfmon" | | Attributes | | version: |
Currently "1.0", the version of the status xml format.
| | now: |
The time that the status snapshot was taken, in the form "DOW MON DAY HH24:MM:SS YYYY"
| | license: |
The human-readable "name" key from your license tag, or evaluation messaging.
|
|
| <resource type="url/process/file"> | top |
|
|
Resource elements contain information on the current (last fetched) status of the resource. The format for "url", "file" and "process" resources is identical.
Note that in addition to the child elements listed below, "passthrough" tags in the configuration will also appear within the resource status element.
|
| Example |
<resource type="url">
<name>webob tutorial 1</name>
<status>-3</status>
<description>'The Offshore Pirate' not found</description>
<updated>Wed May 07 10:45:13 2003</updated>
<changed>Wed May 07 10:45:13 2003</changed>
<path>http://www.softwarepoetry.com/webob/doc/tutorial1.asp</path>
</resource>
| | Parents | webob | | Children | name status description updated changed path signature body | | Attributes | | type: |
Either "url" or "process" as specified in the configuration file "type" attribute.
| | paused: |
If this attribute is present and set to the value "1", this resource has been manually paused.
This can be used to give a visual indication that the data may be out-of-date. Note that while
monitoring will be suspended during "ignore" windows, the paused attribute will not be set.
|
|
| <resource type="perfmon"> | top |
|
|
WINDOWS VERSIONS ONLY
Resource elements contain information on the current (last fetched) status of the resource. The "process" resource status includes one counter child for each Windows Performance Counter in the group.
Note that in addition to the child elements listed below, "passthrough" tags in the configuration will also appear within the resource status element.
|
| Example |
<resource type="perfmon">
<name>webob perf</name>
<counter>
<status>0</status>
<description>ok</description>
<updated>Wed May 07 10:45:13 2003</updated>
<changed>Wed May 07 10:45:13 2003</changed>
<name>webob cpu usage</name>
<value>62.500000</value>
</counter>
</resource>
| | Parents | webob | | Children | name counter | | Attributes | | type: |
The type attribute for a perfmon resource will always be set to "perfmon".
| | paused: |
If this attribute is present and set to the value "1", this resource has been manually paused.
This can be used to give a visual indication that the data may be out-of-date. Note that while
monitoring will be suspended during "ignore" windows, the paused attribute will not be set.
|
|
|
Resource name, as specified in the "name" attribute of the configuration file. |
|
The resource URL or command line, as specified in the "path" element of the configuration file.
|
| Example |
<path>http://www.softwarepoetry.com/webob/doc/tutorial1.asp</path>
<path>python /usr/local/webob/scripts/myscript.py</path>
| | Parents | resource type="url/process/file" |
|
Integer code indicating resource status (sometimes referred to as RSTATUS). Error codes are outlined below:
| Status |
Description |
| 0 |
Success / OK |
| -1 |
Problem with resource HTTP server |
| -2 |
Timeout fetching resource |
| -3 |
Content failure (must-contain, xpath-must-match, threshold, etc.) |
| -4 |
Unknown failure |
| -5 |
System failure fetching Performance Counters |
| -6 |
System failure executing process command-line |
| -7 |
File specified in type="file" resource not found |
| -8 |
Access denied to file specified in type="file" resource |
| > 0 |
postive values indicate type-specific errors, for example HTTP response codes |
|
|
(Available in versions 20030910 and later) A unique signature that identifies the contents of the resource body. Only present if the <show-signatures> global setting is present and contains the value "1".
|
|
If the resource specifies the "include-body" attribute, resource output is stored and inserted into the body element. If the attribute value is "cdata", the text is inserted directly as content of the body element. If the value is "xml", The text is assumed to be a valid XML fragment; if it cannot be parsed as such it is not included in the status xml and the "parse-status" attribute will be set to an error value.
In addition to its importance in content matching, body xml can be used to include arbitrarily detailed information for use in custom dashboards.
|
| Example |
<body parse-status="0">
<stockquote>
<symbol>MSFT</symbol>
<quote>26.05</quote>
<changed>5/7/2003 1:31pm</changed>
</stockquote>
</body>
| | Parents | resource type="url/process/file" | | Children | re-transformed | | Attributes | | parse-status: |
"0" if the body text is a well-formed XML fragment, else a non-zero error code.
|
|
|
Human-readable description of resource status.
|
|
Time resource status was last checked, in the form "DOW MON DAY HH24:MM:SS YYYY".
|
|
Time resource status last changed, in the form "DOW MON DAY HH24:MM:SS YYYY".
|
|
Specifies the current value and status of a single Peformance Counter. All counters are reported as floating point values using the "PdhGetFormattedCounterValue" Windows system call.
|
|
The "friendly name" of the counter if specified. If no "friendly name" is given, the counter path is shown. |
| Example |
<name>webob cpu usage</name>
| | Parents | counter |
|
The current value of the counter. All counters are reported as floating point values using the "PdhGetFormattedCounterValue" Windows system call.
|
| Example |
<value>62.500000</value>
| | Parents | counter |
|
The root element of content transformed using a "regex-transform" configuration element.
|
| Example |
Resource:
<resource name="lycos-50" type="url" include-body="xml">
<path>http://50.lycos.com/</path>
<regex-transform>class="fifty">([^<]+)<</regex-transform>
</resource>
Generated fragment:
<re-transformed>
<re-match>
<re-submatch index="0">class="fifty">Blaster Worm<</re-submatch>
<re-submatch index="1">Blaster Worm</re-submatch>
</re-match>
<re-match>
<re-submatch index="0">class="fifty">Britney Spears<</re-submatch>
<re-submatch index="1">Britney Spears</re-submatch>
</re-match>
...
</re-transformed>
| | Parents | body | | Children | re-match |
|
Represents a single match of the transforming regular expression within the resource output.
|
|
Every "re-match" element will have at least one "re-submatch" child. The text of this child will be the text from the resource output that
matched this instance. If the regular expression contains parenthesized groups, the text from those groups will be placed in additional
"re-submatch" elements, distinguishable by their "index" attribute.
|
| Example |
see the "re-transformed" element
| | Parents | re-match | | Attributes | | index: |
Indicates which parenthesized group in the regular expression the text corresponds to. Index "0" refers to the entire clause;
"1" to the first parenthesized group, "2" to the next, and so on.
|
|
|