Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
Event forwarding scripts
Event forwarding scripts forward events to Northbound applications. The main use of event forwarding scripts is to build adapters to external systems.
Event forwarding scripts tend to be more complicated than other scripts, because they need to be able to handle the following types of operations:
-
Forwarding events arriving in the pipeline.
-
Forwarding updates to events.
-
Receiving and forwarding changes to events.
-
Supporting correlation of events to processes running on the external server receiving the forwarded events.
-
Supporting the exchange of external information required by the script, such as information gleaned from web service calls, information provided by command line tools, or information written to log files by the script.
Note Event scripts are not used to enrich events; for information about scripts to enrich events, see Event Processing Interface scripts.
Unlike other scripts, Event Forwarding scripts use the concrete class OprEvent
.
The OprEvent
class strictly limits code used to modify event information to customizations of the receiveChange()
method, which is called when the target server notifies an event change.
The following code is a valid declaration for an implementation of an event forwarding script:
package com.hp.opr.api.ws.adapter; import com.hp.opr.api.ws.model.event.OprEvent; public abstract interface ExternalProcessAdapter { void init(final InitArgs args); void destroy(); Boolean ping(final PingArgs args); /* The following method can be customized */ Boolean receiveChange(final ReceiveChangeArgs args); Boolean getExternalEvent(final GetExternalEventArgs args); Boolean forwardEvent(final ForwardEventArgs args); Boolean forwardChange(final ForwardChangeArgs args); String toExternalEvent(final OprEvent event); }
The OprEvent
class is imported, and the script class (which is called ExternalProcessAdapter
here, but may have any name) has the standard init()
and destroy()
methods. The following methods implement event forwarding:
-
The
ping()
method tries to contact the connected server and returnstrue
if successful. -
The customizable
receiveChange()
method receives the external changes, and enables OMi to synchronize changes made by the external server. ThereceiveChange()
method is called by the Event Synchronization web service to respond to the following HTTP requests:-
PUT
requests to:/opr-gateway/rest/synchronization/event/<event ID>
-
POST
requests to:/opr-gateway/rest/synchronization/event_change/<event ID>
The HTTP header Content-Type must be set to one of the following values:
-
application/xml
-
application/json
-
application/soap+xml
-
text/xml
-
text/plain
Note If the connected server does not support synchronization the
receiveChange()
method should set the HTTP response code in the argument to403
(Forbidden), and returnfalse
.The
receiveChange()
method should returntrue
if it executed successfully and the values passed in the argument have been updated. -
-
The
getExternalEvent()
method retrieves event details in response to user requests made using the Event Browser for the events that have transferred control to a process on the external server. The values corresponding to the event details are received in and passed by the method's argumentGetExternalEventArgs
. -
The
forwardEvent()
method forwards the event passed in the method'sForwardEventArgs
argument to the external process. -
The
forwardChange()
method forwards the event changes that have occurred since the last successful call to this method for the event passed in the method'sForwardChangeArgs
argument. The first time the method is called for a particular event all changes since the event was forwarded are included. -
The
toExternalEvent()
method converts the event to an external object, and is called by the Event Synchronization web service to respond to the following HTTP request:GET
request to:/opr-gateway/rest/synchronization/event/<event id>
Event forwarding scripts are triggered when a change arrives from the target server as part of the Event Forwarding process on the gateway server.
-
Scripts are executed in the following working directory on the OMi gateway server:
hpbsm_opr-scripting-host
-
Logging information is written to the following log file:
<OMi_HOME>/log/opr-scripting-host/opr-scripting-host.log
Scripts are stored in the database, and can be accessed from the OMi Console.
To configure an event forwarding script and activate it:
-
In OMi, navigate to Event Forwarding:
Administration > Event Processing > Automation > Event Forwarding
Alternatively, click Event Forwarding.
The Event Forwarding screen looks similar to the figure below.
The screen contains two panes:
-
Event Forwarding Rules
This pane lists the configured event forwarding rules. Active scripts are shown in black, non-active scripts in gray.
-
Details
This pane shows the properties of the selected rule.
-
-
You cannot edit the code in the script window directly, but you must use the toolbar in the Event Forwarding Rules pane to access the script, as follows:
-
To edit an existing rule, click Edit Item . The Edit Event Forwarding Rule dialog is shown. Customize the rule and click OK.
-
To configure a new rule, click New Item . The Edit Event Forwarding Rule dialog is shown. Enter the information for the rule and click OK
-
To activate a rule, click Activate Item.
-
By default, the following rules are installed:
-
Automatically forward "downtime started" events to Trouble Ticket System
-
Automatically Forward to Trouble Ticket System
A sample LogfileAdapter
script is provided with the system.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to ovdoc-asm@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: