home products services about
logo software poetry
navigation

Webob Configuration File Reference

This reference describes the format of Webob's XML configuration file format. If you are new to Webob, we strongly suggest you first check out the Webob Quickstart Tutorial.


<webob-config>top

The root item for all WEBOB.XML configuration files.


Childrensettings  resources  actions  authentication  license  

<settings>top

Global settings that configure Webob's behavior.


Parentswebob-config  
Childrenhttp-port  web-root  default-interval  default-timeout  smtp-host  smtp-port  agent-email  http-proxy-host  http-proxy-port  log-directory  log-prefix  log-level  pidfile  valid-ip-list  show-signatures  

<http-port>top

Specifies the port on which Webob will listen for http requests. Since 80 is often used by other applications, the installation script forces the value of this item to 8001.


Default80
Example
<http-port>8001</http-port>
Parentssettings  

<web-root>top

Indicates where to find XSL files used in status transformations, as well as any static files referenced locally by transformed pages (e.g., the Software Poetry logo).


DefaultThe subdirectory "web" in the directory where the webob executable is located
Example
Linux: <web-root>/home/webob/web</web-root>
Windows: <web-root>d:\webob\web</web-root>
Parentssettings  

<default-interval>top

Default interval between status checks against each resource, in seconds.


Default60
Example
<default-interval>120</default-interval>
Parentssettings  

<default-timeout>top

Default time to wait for a resource to respond before triggering a TIMEOUT event, in seconds.


Default60
Example
<default-timeout>30</default-timeout>
Parentssettings  

<smtp-host>top

The SMTP server that Webob will use to send email/pager alerts.


Defaultlocalhost
Example
<smtp-host>exchange.mycompany.com</smtp-host>
Parentssettings  
See Alsosmtp-port  

<smtp-port>top

The port on the SMTP server that Webob will contact to send email/pager alerts. It is very unlikely you will need to change this value.


Default25
Example
<smtp-port>25</smtp-port>
Parentssettings  
See Alsosmtp-host  

<agent-email>top

The email address that mail sent by Webob will be "from".


DefaultSender is set to the same as the recipient
Example
<agent-email>webob@mycompany.com</agent-email>
Parentssettings  

<http-proxy-host>top

A host to use as the proxy for http requests. This tag can be placed within individual resource tags, or within the "settings" element to be used for all url resources.


Defaultno proxy used
Example
<http-proxy-host>myproxy.company.com</http-proxy-host>
Parentssettings  resource type="url"  
See Alsohttp-proxy-port  

<http-proxy-port>top

If http-proxy-host is specified, this is the port on the proxy host that is used. This tag can be placed within individual resource tags, or within the "settings" element to be used for all url resources.


Default8080
Example
<http-proxy-port>8888</http-proxy-port>
Parentssettings  resource type="url"  
See Alsohttp-proxy-host  

<log-directory>top

Indicates where webob should store its internal log files.


DefaultThe directory that contains the Webob executable
Example
Linux: <log-directory>/var/log</log-directory>
Windows: <log-directory>d:\logs</log-directory>
Parentssettings  
See Alsolog-prefix  log-level  

<log-prefix>top

Log files roll over daily and are named in the format prefixYYYYMMDD.log, where "prefix" is the log-prefix setting. This setting can be useful if you are running multiple instances of webob and would like to keep logs in one central location.


Defaultwebob
Example
<log-prefix>zippy</log-prefix>
Parentssettings  
See Alsolog-directory  log-level  

<log-level>top

Integer value in the range 0..50 that specifies the level of detail to show in the logfiles. The default will log important events without creating huge log files.


Default20
Example
<log-level>20</log-level>
Parentssettings  
See Alsolog-prefix  log-directory  

<pidfile>top

LINUX ONLY: The path to a file that will contain the process id of the Webob process. This id should receive any signals (e.g., TERM) meant for the Webob process.


Default"webob.pid" in the directory that contains the Webob executable
Example
<pidfile>/tmp/webob.pid</pidfile>
Parentssettings  

<valid-ip-list>top

If present, this element should be a comma-separated list of valid IP prefixes for accessing webob. Any IP that matches an entry is allowed access, all others are denied.


DefaultNot present
Example
<valid-ip-list>10.0.0,209.16.143.3</valid-ip-list>
Parentssettings  
See Alsoauthentication  

<show-signatures>top

(Available in versions 20030910 and later) If present and set to the value "1", <signature> elements will be added to each non-perfmon <resource> in the status xml. This can be used to obtain reference signatures for <signature-must-match> content matching.


Default0
Example
<show-signatures>1</show-signatures>
Parentssettings  
See Alsosignature-must-match  

<resources>top

The <resources> tag is a container for all resources that webob will monitor. Each resource must have a unique "name" attribute as well as a "type" attribute that indicates what sort of resource is being monitored. Each <resource> type is given its own section in this reference.


Parentswebob-config  
Childrenresource type="url"  resource type="file"  resource type="process"  resource type="perfmon"  

<resource type="url">top

URL resources are the core of most Webob installations. Webob uses the HTTP/1.0 protocol to retrieve the url specified in the element and triggers actions if the page is not returned successfully or times out. In addition, actions can be triggered if the text retuned in the http response does not meet specified criteria. tests.


Example
<resource name="webob tutorial 1" type="url">
	<path>http://www.softwarepoetry.com/webob/doc/tutorial1.asp</path>
	<interval>60</interval>
</resource>
Parentsresources  
Childrenpath  do-action  must-contain  must-not-contain  regex-must-match  regex-must-not-match  xpath-must-match  xpath-must-not-match  signature-must-match  regex-transform  ignore  passthrough  http-proxy-host  http-proxy-port  
Attributes
name: The resource name is used to identify a resource when errors occur. You must assign a unique name to each resource in your configuration.
type: The type attribute for all url resources should be the string "url". Any resource without a type attribute is assumed to be a url resource as well.
interval: Interval between status checks against each resource, in seconds. If not present, the global "default-interval" is used.
timeout: Time to wait for a resource to respond before triggering a TIMEOUT event, in seconds. If not present, the global "default-timeout" is used.
include-body: (Available in versions 20030910 and later) If this attribute is present and contains the value "xml" or "cdata", the most recent http response text will be included in the status xml, within a "body" element. If the attribute value is "cdata", the text is inserted as a CDATA section under the "body" element itself. If the attribute value is "xml", the response text is inserted into the status xml tree as a child of the "body" element. This allows detailed status information to be passed through to dashboard interfaces.
include-body-xml: depricated, see "include-body" attribute. Setting this value to "1" is equivalent to setting "include-body" to "xml".

<resource type="file">top

(Available in versions 20030910 and later) A file resource monitors a file in the filesystem, specified in the <path> element. If the file does not exist or does not match specified content matching criteria, actions are triggered. This can be useful, for example, to watch log files for error strings.

File resources can access files on other machines using standard file sharing mechanisms such as NFS mounts on Linux or UNC paths on Windows. Be sure that the Webob process is running with sufficient user privileges to access the files you want to monitor!

File resources can be used in coordination with <signature-must-match> content matching to protect against unwanted changes to system files.


Example
<resource name="local apache logs" type="file">
	<path>/var/log/httpd/error_log</path>
	<must-not-contain>[error]</must-not-contain>
	<interval>60</interval>
</resource>
Parentsresources  
Childrenpath  do-action  must-contain  must-not-contain  regex-must-match  regex-must-not-match  xpath-must-match  xpath-must-not-match  signature-must-match  regex-transform  ignore  passthrough  
Attributes
name: The resource name is used to identify a resource when errors occur. You must assign a unique name to each resource in your configuration.
type: The type attribute for all process resources should be the string "file".
interval: Interval between status checks against each resource, in seconds. If not present, the global "default-interval" is used.
timeout: Time to wait for a resource to respond before triggering a TIMEOUT event, in seconds. If not present, the global "default-timeout" is used.
include-body: (Available in versions 20030910 and later) If this attribute is present and contains the value "xml" or "cdata", the contents of the specified file (which must be textual!) will be included in the status xml, within a "body" element. If the attribute value is "cdata", the text is inserted as a CDATA section under the "body" element itself. If the attribute value is "xml", the response text is inserted into the status xml tree as a child of the "body" element. This allows detailed status information to be passed through to dashboard interfaces.
include-body-xml: depricated, see "include-body" attribute. Setting this value to "1" is equivalent to setting "include-body" to "xml".

<resource type="process">top

Process resources allow Webob to monitor pretty much anything you can imagine. The command-line specified in the path element is run as a new process. If the process returns an exit code other than 0 or times out, actions are triggered. In addition, actions can be triggered if the text returned as standard output from the process does not meet specified criteria.


Example
Windows:
<resource name="Net Statistics" type="process">
	<path>net statistics server</path> 
	<interval>300</interval>
</resource>

Linux: 
<resource name="/tmp disk space" type="process" include-body="xml">
	<path><![CDATA[
		df -k /tmp | awk '($1 != "Filesystem") { print "<disk><mnt>" $6 "</mnt><avail>" $4 "</avail></disk>" '
	] ]></path>
	<interval>300</interval>
	<xpath-must-match info="tmp space low!">
		//resource[name = '/tmp disk space']/disk[avail &gt;= 100]
	</xpath-must-match>
</resource>
Parentsresources  
Childrenpath  do-action  must-contain  must-not-contain  regex-must-match  regex-must-not-match  xpath-must-match  xpath-must-not-match  signature-must-match  regex-transform  ignore  passthrough  
Attributes
name: The resource name is used to identify a resource when errors occur. You must assign a unique name to each resource in your configuration.
type: The type attribute for all process resources should be the string "process".
interval: Interval between status checks against each resource, in seconds. If not present, the global "default-interval" is used.
timeout: Time to wait for a resource to respond before triggering a TIMEOUT event, in seconds. If not present, the global "default-timeout" is used.
include-body: (Available in versions 20030910 and later) If this attribute is present and contains the value "xml" or "cdata", the standard output of the most recent process invocation will be included in the status xml, within a "body" element. If the attribute value is "cdata", the text is inserted as a CDATA section under the "body" element itself. If the attribute value is "xml", the response text is inserted into the status xml tree as a child of the "body" element. This allows detailed status information to be passed through to dashboard interfaces.
ignore-exitcode: (Available in versions 20030910 and later) If this attribute is present and contains the value "1", the exit code for the process will be ignored when determining the status of the resource. This is useful for those applications that use the exitcode in a way that does not indicate success or failure (for example, the "query process" command used to fetch information on Windows Terminal Server processes).
include-body-xml: depricated, see "include-body" attribute. Setting this value to "1" is equivalent to setting "include-body" to "xml".

<resource type="perfmon">top

WINDOWS VERSIONS ONLY

"Perfmon" resources monitor one or more Windows Performance Monitor counters. If the values cross given thresholds actions can be triggered.

IMPORTANT: If you will be monitoring counters on remote machines, the Webob service must be configured to run as a user that has sufficient privileges to view the counters. The interface for setting this account is slightly different on the various Windows platform. Open the "Services" Control Panel (under Administrative Tools), right-click the "Webob by Software Poetry" service and choose "Properties". Under the "Log On" tab, choose "This Account" and specify an account with the apprpriate rights.


Example
<resource name="server01 vitals" type="perfmon">
	<counter>
		<friendly-name>server01 cpu usage</friendly-name>
		<path>\\server01\Processor(_Total)\% Processor Time</path>
		<threshold type="max">90</threshold>
	</counter>
	<counter>
		<friendly-name>server01 free memory</friendly-name>
		<path>\\server01\Memory\Available MBytes</path>
		<threshold type="min">50</threshold>
	</counter>
	<interval>10</interval>
</resource>
Parentsresources  
Childrencounter  do-action  ignore  passthrough  
Attributes
name: The resource name is used to identify a resource when errors occur. You must assign a unique name to each resource in your configuration.
type: The type attribute for all performance monitor resources should be the string "perfmon".
interval: Interval between status checks against each resource, in seconds. If not present, the global "default-interval" is used.

<path>top

Contains the target "path" (URL or command-line) for the resource. Take care to escape XML entities or wrap the path item in CDATA tags.

Exactly 1 path element must be present in each url or process resource.


Example
<path>http://www.softwarepoetry.com/webob/doc/tutorial2.asp?symbol=msft</path>
<path>python /usr/local/webob/scripts/wbhist.py</path>
Parentsresource type="url"  resource type="file"  resource type="process"  

<do-action>top

Indicates a named action (within the actions tag) that should be triggered when errors occur on this resource. While it is possible to embed an action tag directly in a resource, generally you will want to associate an action with more then one resource. The do-action tag allows this level of indirection.

0 or more do-action elements can be present in each resource.


Example
<do-action name="emailoperations" skip="2" />
Parentsresource type="url"  resource type="file"  resource type="process"  resource type="perfmon"  
See Alsoactions  
Attributes
name: Indicates which global action the tag refers to.
skip: Optional attribute indicates how many times in sequence a resource must fail before the action is triggered. If not present, the "skip" attribute of the action tag itself is used; if that is also not present, the default is 1.

<must-contain>top

The output of the resource is searched, case-insensitive, for the text of the element. If it is not found, actions are triggered.

0 or more must-contain elements can be present in each resource.


Example
<must-contain>database opened ok</must-contain>
Parentsresource type="url"  resource type="file"  resource type="process"  
See Alsomust-not-contain  
Attributes
info: Optional attribute contains error text sent to actions if the resource fails as a result of this tag. By default the search text is used; using info can sometimes provide a more human-understandable description of the error.

<must-not-contain>top

The output of the resource is searched, case-insensitive, for the text of the element. If it is found, actions are triggered.

0 or more must-not-contain elements can be present in each resource.


Example
<must-contain>error opening database</must-contain>
Parentsresource type="url"  resource type="file"  resource type="process"  
See Alsomust-contain  
Attributes
info: Optional attribute contains error text sent to actions if the resource fails as a result of this tag. By default the search text is used; using info can sometimes provide a more human-understandable description of the error.

<regex-must-match>top

The regular expression in the element text is applied to the resource output. If at least one match is found, the test succeeds. Take care with leading and trailing space in this element; all whitespace is significant in the regular expression.

0 or more regex-must-match elements can be present in each resource.

Available in versions 20030910 and later.


Example
<resource type="url" name="yahoo">
	<path>http://www.yahoo.com</path>
	<regex-must-match info="web page missing copyright!"
		>Copyright &amp;copy; 20[0-9][0-9] Yahoo! Inc.</regex-must-match>
</resource>
Parentsresource type="url"  resource type="file"  resource type="process"  
See Alsoregex-must-not-match  
Attributes
info: Optional attribute contains error text sent to actions if the resource fails as a result of this tag. By default the search text is used; using info can sometimes provide a more human-understandable description of the error.

<regex-must-not-match>top

The regular expression in the element text is applied to the resource output. If any matches are found, the test fails. Take care with leading and trailing space in this element; all whitespace is significant in the regular expression.

0 or more regex-must-not-match elements can be present in each resource.

Available in versions 20030910 and later.


Example
<resource type="process" name="tempdir">
	<path>cmd /c "dir c:\temp | findstr /v /c:(s)"</path>
	<regex-must-not-match info="file too big in c:\temp"
		>[0-9],[0-9][0-9][0-9],[0-9][0-9][0-9]</regex-must-not-match>
</resource>
Parentsresource type="url"  resource type="file"  resource type="process"  
See Alsoregex-must-match  
Attributes
info: Optional attribute contains error text sent to actions if the resource fails as a result of this tag. By default the search text is used; using info can sometimes provide a more human-understandable description of the error.

<xpath-must-match>top

The XPath statement in the element text is applied to the resource output, which is assumed to be XML (if it does not parse as valid xml, the test fails and actions will be triggered). If the XPath returns one or more elements, the test succeeds. XPath can be used to do arbitrarily complex calculations on output --- learn more at w3schools. Be careful of XML escaping rules!

0 or more xpath-must-match elements can be present in each resource.


Example
<xpath-must-match info="tmp space low!">
	//resource[name = '/tmp disk space']/disk[avail &gt;= 100]
</xpath-must-match>
Parentsresource type="url"  resource type="file"  resource type="process"  
See Alsoxpath-must-not-match  
Attributes
info: Optional attribute contains error text sent to actions if the resource fails as a result of this tag. By default the search text is used; using info can sometimes provide a more human-understandable description of the error.

<xpath-must-not-match>top

The XPath statement in the element text is applied to the resource output, which is assumed to be XML (if it does not parse as valid xml, the test fails and actions will be triggered). If the XPath returns one or more elements, the test fails. XPath can be used to do arbitrarily complex calculations on output --- learn more at w3schools. Be careful of XML escaping rules!

0 or more xpath-must-not-match elements can be present in each resource.


Example
<xpath-must-not-match info="MSFT &lt; $50">
	//stockquote[symbol = 'MSFT' and quote &lt;= 50]
</xpath-must-match>
Parentsresource type="url"  resource type="file"  resource type="process"  
See Alsoxpath-must-match  
Attributes
info: Optional attribute contains error text sent to actions if the resource fails as a result of this tag. By default the search text is used; using info can sometimes provide a more human-understandable description of the error.

<signature-must-match>top

(Available in versions 20030910 and later) Signature matching is used to detect when the output of a resource has changed. It is most commonly used with file resources to ensure that core system files such as /etc/passwd are not altered, but it may also be used with the output from other resources. The signature, however, is tied to the exact contents of the output; any change in the file contents will give it a new signature.

A webob "signature" is a short but unique string (for the technically curious, it is an MD5 hash of the resource output). The signature in the element text is matched against the signature computed from the resource output to determine if there is a match. If not, actions are triggered.

To obtain a reference signature for your content, you generally have two choices. A value of "1" for the global setting <show-signatures> tells Webob to put <signature> element in the status output; by default this is disabled. By running with <show-signatures> turned on, you can simply copy the reference signature from the status xml. This is the only method by which you can obtain a signature for url or process resources. For file resources, you can also run the command "webob -m path-to-file" from the command-line of the Webob installation directory to generate a reference signature.


Example
<signature-must-match info="somebody edited /etc/passwd!">
	6ae0b9098901dbeec82c39313459d80e
</signature-must-match>
Parentsresource type="url"  resource type="file"  resource type="process"  
See Alsoshow-signatures  
Attributes
info: Optional attribute contains error text sent to actions if the resource fails as a result of this tag. By default the search text is used; using info can sometimes provide a more human-understandable description of the error.

<regex-transform>top

(Available in versions 20030910 and later) Before any content matching is performed, the regular expression in the text of the element is applied to the output text of the resource. An XML fragment is created from the matches and submatches (parenthesized groups) that are found, and this fragment is used for all content matching and body inclusion.

This allows the user to take semi-structured output and convert it seamlessly into XML. Aribtrarily-sophisticated content matching rules can then be applied to the fragment.

Be careful of leading and trailing space in the text; all whitespace is significant in the regular expression.


Example
Resource:
<resource name="lycos-50" type="url" include-body="xml">
	<path>http://50.lycos.com/</path>
	<regex-transform>class="fifty"&gt;([^&lt;]+)&lt;</regex-transform>
</resource>

Generated fragment:
<re-transformed>
	<re-match>
		<re-submatch index="0">class="fifty"&gt;Blaster Worm&lt;</re-submatch> 
		<re-submatch index="1">Blaster Worm</re-submatch> 
	</re-match>
	<re-match>
		<re-submatch index="0">class="fifty"&gt;Britney Spears&lt;</re-submatch> 
		<re-submatch index="1">Britney Spears</re-submatch> 
	</re-match>
	...
</re-transformed>

Parentsresource type="url"  resource type="file"  resource type="process"  

<ignore>top

Specifies a daily or weekly period during which monitoring should be suspended for this resource. This can be used to avoid spurious errors during a scheduled reboot or maintenance window.

0 or more ignore elements may be present in each resource.


Example
<ignore dow="sat" time="23:55" duration="10" /> (each saturday starting at 11:55pm for 10 minutes)
<ignore time="12:00" duration="60" /> (every day for one hour beginning at noon)
Parentsresource type="url"  resource type="file"  resource type="process"  resource type="perfmon"  
Attributes
time: Formatted as HH:MM using a twenty-four hour represention, indicates the time at which the ignore window starts. This attribute must be present.
duration: Number of minutes the ignore window should be active. This attribute must be present.
dow: Specifies the day of the week for the ignore window as a three-character code: sun, mon, tue, wed, thu, fri, sat. If not present the ignore window is applied daily. Only one day can be specified in each ignore element.

<passthrough>top

Passthrough elements are simply copied from the configuration file into the status XML for the resource. This can be useful if you have created a custom dashboard that shows detailed information about the systems being monitored.

0 or more passthrough elements may be present in each resource.


Example
<passthrough tag="network-location">rack 2, switch SW01, port 5</passthrough>
Parentsresource type="url"  resource type="file"  resource type="process"  resource type="perfmon"  
Attributes
tag: The name of the element "passed through" to the status XML. In the example above, the element will appear in the status as <network-location>rack 2, switch SW01, port 5</network-location>.

<counter>top

Specifies a single Windows Performance Counter Object that should be monitored.

1 or more counter elements may be present in each perfmon resource.


Example
<counter>
	<friendly-name>server01 cpu usage</friendly-name>
	<path>\\server01\Processor(_Total)\% Processor Time</path>
	<threshold type="max">90</threshold>
</counter>
Parentsresource type="perfmon"  
Childrenfriendly-name  path  threshold  

<friendly-name>top

A human-readable description of the counter. If not present, the counter path is used.


Example
<friendly-name>server01 cpu usage</friendly-name>
Parentscounter  

<path>top

Counters are specified as a "counter path", generally specified as:

\\Machine\PerfObject(ParentInstance/ObjectInstance#InstanceIndex)\Counter

More information on counter paths is available from Microsoft; you can also open the Performance Monitor application and look at counter properties to see sample syntax.


Example
<path>\\server01\Processor(_Total)\% Processor Time</path>
Parentscounter  

<threshold>top

Counter values are returned as floating point numbers. Thresholds allow you to place limits on acceptable values. There may be at most one "max" and one "min" threshold for each counter. The text of the element defines the threshold.


Example
<threshold type="max">90</threshold>
Parentscounter  
Attributes
type: This attribute can be "max", in which case actions are triggered if the counter exceeds the given value, or "min", in which case the value must not drop below the given value. This attribute must be present.

<actions>top

The actions tag is a container for all global actions that webob can take in response to changes in resource status. Global actions are linked to resources with do-action tags. Each action should have a unique "name" attribute as well as a "type" attribute that indicates what sort of action to take. Each action type is given its own section this reference. action tags may also appear directly within a resource definition.


Parentswebob-config  
Childrenaction type="email"  action type="file"  action type="db"  action type="process"  

<action type="email">top

An email action uses the SMTP protocol to send error notifications to email accounts, pagers or SMS devices. The action will be triggered once when the resource enters an error state, and again when the error is resolved.

The email will contain the name of the affected resource and a numeric and textual description of the error. You can find a list of numeric RSTATUS codes in the Webob Status XML Format Reference.

The smtp-host setting must be valid in order for email to be sent.


Example
<action name="email-operations" type="email">
	<address>foo@bar.com</address>
	<address>5555555555@wirelesscarrier.com</address>
</action>
Parentsactions  
Childrenaddress  
See Alsosmtp-host  smtp-port  agent-email  
Attributes
name: The action name is used to identify an action from within do-action tags. You must assign a unique name to each action in your configuration.
type: The type attribute for all email actions must be "email".
skip: Optional attribute indicates how many times in sequence a resource must fail before the action is triggered. If not present, the default is 1.

<address>top

Contains the email address of one recipient for the action. One or more addresses may be specified in each email action.


Example
<address>foo@bar.com</address>
Parentsaction type="email"  

<action type="file">top

File actions allow you to capture historical outage information in a comma-separted (CSV) file suitable for import into applications such as Microsoft Excel. A line is written to the file at the end of each error event. Each line contains the following information:

  • Resource Name
  • Time Event Started (YYYY-MM-DD HH24:MIN:SEC)
  • Time Event Ended (YYYY-MM-DD HH24:MIN:SEC)
  • Duration (seconds)
  • Error RSTATUS code
  • Error description

You can find a list of numeric RSTATUS codes in the Webob Status XML Format Reference.


Example
<action name="history-csv" type="file">
	<file>d:\webob\history.csv</file>
</action>
Parentsactions  
Childrenfile  
Attributes
name: The action name is used to identify an action from within do-action tags. You must assign a unique name to each action in your configuration.
type: The type attribute for all file actions must be "file".
skip: Optional attribute indicates how many times in sequence a resource must fail before the action is triggered. If not present, the default is 1.

<file>top

Specifies the complete path to a comma-separated (CSV) file into which Webob will write outage event information. There should be exactly one file element for each file resource.


Example
Linux: <file>/usr/local/webob/webob.csv</file>
Windows: <file>d:\webob\history.csv</file>
Parentsaction type="email"  

<action type="db">top

DB actions allow you to capture historical outage information in a database table. A row is written to the database at the end of each error event. The name of the table may be specified as part of the action, but it must contain at least the following columns:

Name Type Description
name varchar Resource Name
time_started timestamp Time event started
time_ended timestamp Time event ended
duration integer Duration (seconds)
error_status integer RSTATUS error code (see Webob Status XML Format Reference)
error_text varchar Description of error

Other columns may exist in the table, but must be defined as NULL or have acceptable default values. Note also that varchar lengths are not explicitly defined by Webob; it is up to you to be sure there is sufficient space in the columns for your configuration.

ODBC connectivity enables Webob to support almost any database on the Windows platform. However, on Linux we currently support only tables in mySQL databases. Future versions will include broader database support under Linux.

Both the type and connectstring children must be present.


Example
<action name="history-db" type="db">
	<type>4</type>
	<connectstring>Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\webob\webob.mdb</connectstring>
	<table>webob</table>
</action>
Parentsactions  
Childrentype  connectstring  table  
Attributes
name: The action name is used to identify an action from within do-action tags. You must assign a unique name to each action in your configuration.
type: The type attribute for all database actions must be "db".
skip: Optional attribute indicates how many times in sequence a resource must fail before the action is triggered. If not present, the default is 1.

<type>top

The type field indicates the type of database being used. The following table lists database type codes:

Type Platform Database
1 Linux mySQL
4 Windows Microsoft Access
5 Windows Microsoft SQL Server
6 Windows Oracle
3 Windows Other ODBC Database


Example
<type>4</type>
Parentsaction type="db"  

<connectstring>top

Provides host, login and other options for connecting to the appropriate database. For Windows databases, this should be a standard ODBC connection string --- many examples can be found at this site by Able Consulting. For mySQL, use the format shown in the example.


Example
mySQL: <connectstring>host=;user=webob;pass=webob;db=webob</connectstring>
Access: <connectstring>Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\webob\webob.mdb</connectstring>
Parentsaction type="db"  

<table>top

Optional element that indicates the name of the database table where rows should be inserted.


Defaultwebob
Example
<table>webob</table>
Parentsaction type="db"  

<action type="process">top

Process actions allow you to run arbitrary code in response to changes in resource status. The process will be executed once when a resource enters an error state, then again when the error is resolved. There are a number of printf-style parameters that can be used to pass information to your process; the table below gives an exhaustive list:

Code Description
%n Resource name
%s New RSTATUS code (See Webob Status XML Reference for codes)
%d New status description
%o Previous RSTATUS code (See Webob Status XML Reference for codes)
%e Previous status description
%t Duration in last state (in seconds)
%% Used to include a % character in the command line

Remember that your process will be run with the same permissions as the Webob process.


Example
<action name="popup" type="process">
	<command>net send localhost webob status change for %n: %d</command>
	<timeout>300</timeout>
</action>
Parentsactions  
Childrencommand  timeout  
Attributes
name: The action name is used to identify an action from within do-action tags. You must assign a unique name to each action in your configuration.
type: The type attribute for all process actions must be "process".
skip: Optional attribute indicates how many times in sequence a resource must fail before the action is triggered. If not present, the default is 1.

<command>top

The text of this element is used as a command-line for a spawned process. Take care to escape XML entities or wrap the path item in CDATA tags if needed. Refer to the process action documentation for printf-style substitutions that can be used in a command-line to pass information about the resource that triggered the action.


Example
<command>net send localhost webob status change for %n: %d</command>
Parentsaction type="process"  

<timeout>top

Optional element constrains the amount of time the script is allowed to run, in seconds.


Defaultinfinite (no timeout)
Example
<timeout>300</timeout>
Parentsaction type="process"  

<authentication>top

If the authentication element is present, Webob will require users to log in with a password before they are granted access. Webob uses Basic HTTP authentication. Each valid login/password combination is specified with a user element. There may be as many user elements present as appropriate for your organization.


DefaultAuthentication is disabled by default.
Parentswebob-config  
Childrenrealm  user  
See Alsovalid-ip-list  

<user>top

Specifies a unique login/password combination. Passwords may be specified in hashed or clear-text form.


Example
<user>
	<login>someuser</login>
	<password>450893b6500bcd72b7ac4a6ed43c7f22</password>
</user>
Parentsauthentication  
Childrenlogin  password  

<login>top

A name used to login to webob.


Example
<login>someuser</login>
Parentsuser  
See Alsopassword  

<password>top

A password used to login to webob. If the first character of this password is '#', webob interprets the value as clear-text. This is probably not a good idea because it leaves your passwords open to anyone who finds your configuration file. From the command line, you can run "webob -p [password]" to obtain a hashed value that can be used without a '#' character to specify a password more securely.


Example
<password>450893b6500bcd72b7ac4a6ed43c7f22</password>
<password>#cleartextpassword</password>
Parentsuser  
See Alsologin  

<realm>top

This element allows you to set the "realm" displayed to the user in the Basic authentication dialog.


Defaultwebob
Parentsauthentication  

<license>top

When you purchase a Webob license you will receive a license xml fragment. This fragment validates your purchase and ensures that all features are active and no "evaluation" messaging appears in the product interface. Click here to purchase a license now.


DefaultNot present in the evaluation version
Parentswebob-config  
Childrenname  key  

<name>top

A textual description of your license. Provided by Software Poetry upon purchase; usually includes your organization name.


Parentslicense  

<key>top

An encrypted version of your license for validation. Provided by Software Poetry upon purchase.


Parentslicense  




















































footer
Copyright © 2002-2010 Software Poetry, Inc. – all rights reserved