The source page of the REST Web service listener policy editor enables you to set up the path as part of URL where the REST Web Service Listener will listen for the XML data. In event and metric integrations, you can additionally upload the sample data to BSM Connector, and to specify one or more XML tags that create the shortcuts to the XML elements that you want to process. When integrating the topology data, you can specify the age to deletion and to decide whether delta detection should be done.
In the BSM Connector user interface, click in the toolbar. Then click Event >
REST Web Service Listener.
In the BSM Connector user interface, click in the toolbar. Then click Metrics >
REST Web Service Listener.
In the BSM Connector user interface, click in the toolbar. Then click Topology >
REST Web Service Listener.
In the BSM Connector user interface, click in the toolbar. Then click Generic output >
REST Web Service Listener.
Alternatively, double-click an existing policy to edit it.
Click Source to open the policy Source page.
REST Web Service Listener listens for the XML data at the predefined URL. For example, for the event integration this URL should look as follows:
http(s)://<bsmc_FQDN>:<configured_port>/bsmc/rest/events/<PATH>
In this instance, <PATH>
is the string, entered in the policy. The REST Web Service Listener for the metric and topology integrations should look as follows:
/bsmc/rest/metrics/<PATH>
/bsmc/rest/topology/<PATH>
You can customize the BSMC REST Web Service Listener by using the bsmc-wsconf.[bat|sh]
utility, located at:
$OvDataDir/installation/HPOprBSMC/
For example, to enable basic authentication, set the listener port to 12345 and set the credentials any client needs to provide to post data, type the following:
bsmc-wsconf.bat -enable_auth -port 12345 -username integrator -password bsmcRESTd8a
For the bsmc-wsconf.[bat|sh]
utility usage details, type:
bsmc-wsconf.[bat|sh] -help
The following table lists the available XPL configuration parameters that apply to each activated web service policy:
Attribute Name | Default | Description |
---|---|---|
RESTWS_PORT
|
30005
|
BSM Connector will spawn an HTTP(s) server on the specified port. |
RESTWS_USE_BASIC_AUTH
|
false
|
If set to TRUE , the REST Web Service Listener requires credentials. The basic HTTP authentication mechanism is used. |
RESTWS_AUTH_USER
|
Encrypted user name, used for the basic HTTP authentication.
Encryption is done by using the OvSecCore crypt mechanism.
|
|
RESTWS_AUTH_PASSWORD
|
Encrypted password, used for the basic HTTP authentication.
Encryption is done by using the OvSecCore crypt mechanism.
|
|
RESTWS_REGISTER_CB
|
false
|
If set to TRUE , the REST Web Service Listener is registered at the BBC communication broker. This enables accessing the Web Service Listener through the port 383. |
You can view the XPL configuration parameters by using the ovconfget
command.
REST Web Service accepts the regular XML data without an XML header structure ("<?xml version=.....
") and all-embracing XML root tag. Additionally, you can collect the data for multiple events and send them consolidated to the REST Web Service.
Note: A successful Web Service call should result in HTTP status code 200. Otherwise status codes like 501 or 401 are returned.
The following is an example of the XML event:
<BSMCEvent>
<title>Detected neglectable impact on system hydrogen.elementary.com caused by monitored aspect workers_restart_rate [1/s]: 0.0000 at Tue Aug 5 13:41:32 2014</title>
<timeStamp>12/13/14 08:59:57 AM</timeStamp>
<impact>neglectable</impact>
<category>Monitor Alert</category>
<relatedCounter>workers_restart_rate [1/s]</relatedCounter>
<relatedEntity>hydrogen.elementary.com</relatedEntity>
</BSMCEvent>
This task describes how configure the REST Web service listener source and how the policy reads it.
Enter the Path parameter string, which is a part of the actual URL where the REST Web Service Listener listens for the XML data from the Web service client.
Click to load a sample XML file. You can load a sample file from the BSM Connector system or from the system where the Web browser runs.
When you load sample data, BSM Connector replaces already loaded data with the new data. This does not affect any mappings that are defined based on previously available sample data.
Click to create one or more XML event or metric tags.You can create a tag manually by typing the XML element. If you are working with sample data, you can create a tag by double-clicking the XML element in the list.
The XML tag creates a shortcut to the XML element that you want the policy to process. An event tag typically identifies an event record in an XML log file, while a metric tag identifies a metric record in an XML log file. You can define more than one XML tag. For example, an XML file may contain two types of events: <PerformanceAlert>
and <AvailabilityAlert>
. To process both types, define both elements as event tags.
This task describes how configure the XML source file and how the policy reads it.
Enter the Path parameter string, which is a part of the actual URL where the REST Web Service Listener listens for the XML data from the Web service client.
Enter the age to deletion - the number of times for the policy to be run for a host that is not part of the topology data. After this number of policy executions, this host is deleted from the server.
Optionally, enable delta detection, so that only the difference between the received XML file and the repository is sent to the topology server.
Click to upload the XML file to the BSM Connector user interface policy editor. The results are displayed in the Sample Data tabs of the policy.
UI Element |
Description |
---|---|
Path |
A string entered in the policy. This string is a part of the actual URL where the REST Web Service Listener listens for the XML data. For example, for the events this URL should look as follows:
Only the following characters are allowed in a path: For more information on customizing the REST Web Service Listener, see Configuring the Data Source in REST Web Service Listener Policies . |
Character Set |
Name of the character set used by the XML data that the policy reads. Note: It is important to choose the correct character set. If the character set that the policy is expecting does not match the character set in the XML data, pattern matching may not work, and the event details can have incorrect characters or be truncated in OMi. If you are unsure of which character set is used by the XML data that the policy reads, consult the documentation of the program that writes the file. Default value: UTF-8 |
Sample Data (Events and Metrics only) | |
![]() |
Uploads the XML file to the BSM Connector. Note: BSM Connector can only load a maximum of 50 MB of sample data. |
![]() |
Opens the REST Web Service Sample Data dialog box. This dialog box displays the XML elements and values contained in the uploaded XML sample data. |
XML Event Tag (Events only) Enables you to specify one or more XML event tags. The XML event tag creates a shortcut to the XML element that you want to process. An event tag typically identifies an event record in an XML data. You can define more than one event tag. |
|
![]() |
Create a new XML event tag manually. Enables you to type an XML element in the provided box. Create a new XML event tag from XML sample data. Opens the XML Sample Data Outline dialog box. This dialog box displays the XML elements and attributes contained in the uploaded XML sample data. |
![]() |
Deletes the selected XML event tag. Caution: Deleting an event tag that is referenced in a policy corrupts the policy and renders it unusable. |
XML Metric Tag |
Enables you to specify one or more XML metric tags. The XML metric tag creates a shortcut to the XML element that you want to process. A metric tag typically identifies a metric record in an XML data. You can define more than one metric tag. |
![]() |
Create a new XML metric tag manually. Enables you to type an XML element in the provided box. Create a new XML metric tag from XML sample data. Opens the XML Sample Data Outline dialog box. This dialog box displays the XML elements and attributes contained in the uploaded XML sample data. |
![]() |
Deletes the selected XML metric tag. Caution: Deleting a metric tag that is referenced in a policy corrupts the policy and renders it unusable. |
Detect deltas (Topology only) |
A delta is the difference between the received XML file and the repository. The delta is the bare minimum of information about the changes. It discovers all changes without regards to the RTSM model. If an instance or relation is not discovered for a certain amount of time (Age to deletion), it is deleted. The counter goes up each time when the algorithm is running (this depends on the interval and the last time the file was written / sent via web service). If not selected,no delta detection is done and the incoming topology file is directly sent to the topology server. Default value: selected. |
Age to deletion (Topology only) |
A number of times for the policy to be run for a host that is not part of the topology data. After this number of policy executions, this host is deleted from the server. |