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 |
|
Topology synchronization scripts
The topology synchronization package enables you to include user-defined Groovy scripts in the topology synchronization process.
Scripts can be used to trigger custom actions as part of the topology synchronization process, such as:
-
Manipulate service hierarchies beyond transformation and enrichment limitations posed by model.
-
Perform post-synchronization actions.
-
Modify topology data without the need to alter the topology model in OM.
Scripts are triggered automatically
as part of the hpbsm_wde
process.
Logging information is written to the following log file:
<OMi_HOME>/log/wde/opr-svcdiscserver.log
Caution If execution of an automatically triggered script negatively affects the synchronization process, both the topology and event synchronization processes are at risk of being disrupted. Adhere to the best practices described in Best practices as closely as possible to minimize this risk.
The name of a script file determines where in the topology synchronization process it is executed. Three locations in the process trigger script files, provided the naming of the script files adheres to the following convention:
-
If present, the script named
preEnrichment.groovy
is executed before the mapping of OM nodes and services. -
If present, the script named
preUpload.groovy
is executed after OM nodes and services are mapped, but before they are uploaded to the uCMDB. -
If present, the script named
postUpload.groovy
is executed after the nodes and services are uploaded to the uCMDB.
Topology Synchronization scripts are an integral part of the Topology Synchronization package, and are stored in the database when the package is installed. The topology synchronization process executes the scripts residing in the database without referring to the scripts in the file system, so if you make changes or additions to the scripts in the file system you must upload the Topology Synchronization package again.
To add, remove, or change a script:
-
Place the completed or changed script in the following folder:
<OMi_HOME>/conf/opr/topology-sync/sync-packages/<Sync Package Name>
To remove a script:
-
Use the
sdtool
command to remove the script from the database. -
Delete the script from the file system.
Note Scripts installed with the standard installation are present in the file system. Do not delete these scripts, because they are used by the system.
-
-
Use the
sdtool
command to upload the synchronization package to the database.
When developing topology synchronization scripts, consider the following aspects:
-
In a multi-server environment particular care must be taken to keep the scripts in sync. After uploading a synchronization package including new or modified scripts to the database, the synchronization process on all server is changed according to the scripts residing in the file system of the server used to upload the package. The scripts residing in the file system of all other servers, however, no longer match the scripts in the database, so if one of these servers is used to upload scripts, the synchronization may revert to an earlier, undesired state. To keep this from happening, HPE recommends using the same server for managing topology synchronization scripts.
-
Pre-upload and post-upload scripts included in the same sync package share their scope with respect to variables. Therefore, values assigned to variables in the
preUpload.groovy
script can be used in thepostUpload.groovy
script in the same package. Scripts across different sync packages do not share the same scope, so the same variable names may be used in scripts as long as they are not part of the same synchronization package. -
Scripts always have access to the
scriptInterface
andsyncData
objects. The API functions provided by these objects encapsulate the internal objects. Always reference these objects rather than accessing the internal objects directly. For example, usemyCI = createCI( caption:"myCI" )
to return an ICi implementation without exposing the CI class, rather than usingnew CI(...) myCI
See also Available APIs. -
Use only Java interfaces, not classes. Additionally, a set of special factory functions can be used. See also Available APIs.
Suppose that the captions of services that contain the string disk
are to be highlighted by adding the prefix >>>
and the suffix <<<
, and the number of changes made is to be reported via email to the Administrator.
Adding the prefixes and suffixes can be done after the OM nodes are mapped. The following preUpload.groovy
script changes the captions and stores the number of changes in the variable iChanges
:
iChanges = 0; // Get all the resolved services using the getConfigurations() // method of the syncData object and store them in the array services. arrayServices = syncData.getConfigurationItems(); // Check all elements of the array services for the // substring "disk", and if found add pre- and suffix and // increment the counter. arrayServices.findAll{ it.getCaption().indexOf( "disk" ) >= 0 }.each { stringCaption = svc.getCaption(); svc.setCaption( ">>> " + stringCaption + " <<<" ); iChanges++; }
The email is sent after the upload is completed, as part of the postUpload.groovy
script (Note that the sendmail
command in the last example is not available on a standard Windows platform). Because this script is included in the same synchronization package as the preUpload.groovy
script, the variable iChanges
is still in scope.
msg = "Sync Ready! ${iChanges} CIs modified!"; scriptInterface.exec( "sendmail Administrator " + msg );
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: