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 |
|
- Perl Policy User Interface
- Configuring REST Web Service Listener Policy Properties
- Configuring the Data Source in Perl Policies
- Configuring Mappings in Perl Script Policies
- Configuring Mappings in Perl Policies (Generic Output Only)
- Configuring Event Defaults in Perl Policies
- Configuring Metrics Defaults in Perl Policies
- Configuring Event Rules in REST Web Service Listener Policies
- Configuring Metrics Rules in REST Web Service Listener Policies
- Configuring Options in Perl Policies
Configuring the Data Source in Perl Policies
The source page of the Perl Script policy editor enables you to set up the path to the Perl script or upload an embedded Perl script, define the polling interval, specify the subroutine that transfers the data and send any options to it, and specify the result data array and keys.
To access
-
In the Operations Connector user interface, click in the toolbar. Then click Event > Perl Script.
-
In the Operations Connector user interface, click in the toolbar. Then click Metric > Perl Script.
-
In the Operations Connector user interface, click in the toolbar. Then click Generic output > Perl Script.
Alternatively, double-click an existing policy to edit it.
Click Source to open the policy Source page.
Understanding How Data is Collected and Processed using Perl Scripts
Collecting and processing data
The Perl script that is run periodically can be either loaded from an external location or embedded in the policy. You must also provide the name of the subroutine (sub
) that is executed and any parameters that are passed to it.
During the execution of the script, Operations Connector initializes an embedded Perl interpreter (the Operations Agent Perl runtime), and passes all provided parameters to the Perl subroutine. The subroutine then collects and processes the data.
Parallel processing of the Perl script is not supported.
Passing data to policies
Before the subroutine exits, all data to be passed to Operations Connector must be present in the transfer data structure. This data structure must be an array of hash references and available as a global variable in the Perl script. You can define the name of this array, but it must match the name that you specify in the policy configuration.
Each hash inside the array indicates a single record of information. The hash is formed by pairs of an attribute name (the hash key) and a value, both represented as strings. In Operations Connector terminology, the attribute name is an input property and can be accessed as <$DATA:<attribute_name>>
in set operations and as '<attribute_name>'
in conditions.
Assuming that the hash %BASIC_METRIC_DATA
, which you use to pass data to Operations Connector, contains the following attribute names:
my %BASIC_METRIC_DATA = ( "counter_name" => "<value>", "counter_value" => "<value>", "time_measured" => "<value>" );
In this case, the Operations Connector input properties are:
<$DATA:counter_name> <$DATA:counter_value> <$DATA:time_measured>
If the execution is successful, the subroutine should return 0
. Any other value indicates an error in the script execution and is logged to system.txt
.
Tasks
How to configure the Perl script source
This task describes how configure the Perl script source and how the policy reads the data.
-
Provide the path to the external Perl script or click to load an embedded script.
-
Define the script polling interval.
-
Provide the name of the subroutine that is executed. The name of the subroutine must match the name of the subroutine in the Perl script.
-
Optionally, provide a list of parameters that are passed to the subroutine. Click to add a new parameter and to remove it.
The parameters can be saved to the policy encrypted and are decrypted only before the subroutine is called. To encode the parameter values, right-click the parameter and select the option Encode as password.
-
Provide the result data array name. The name must match the name of the result data array name in the subroutine.
- Provide a list of result data key names. Click to add a new key name and to remove it.
Related tasks
UI Descriptions
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: