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 |
|
- Service Health Rules API
- API Group and Sibling Rule
- API Sample Rule
- API Duration-Based Sample Rule
- Create rules with the Rules API
- Define an API rule in the CI Customizations page
- Create a text file-based API rule
- Define an API rule in the rule repository
- Work with tooltip entries
- Write to log files from the Rules API code
- Include a CI property in Rules API calculations
- Examples - API Sample Rule
- Examples - API Group and Sibling Rule
API Sample Rule
A Sample rule calculates KPIs based on original data taken from sample fields; the number of samples included in the calculation is limited by a maximum number of samples parameter.
The Sample rule implements the Rules API Interface LeafCalculator, using the following guidelines:
-
In this interface, the only method is calculateKPI. The method signature is:
-
The calculateKPI method includes the parameters ci, kpi, and samples. These represent the current CI, the KPI whose value the rule calculates, and the samples to be used in the rule calculation based on the Maximum number of samples parameter. (If this parameter value is 1, list one sample in this field.)
-
The kpi parameter type is KPI, and is used to set calculation results.
-
The samples parameter is a List of Sample objects, which hold sample field values.
public void calculateKPI(CI ci, KPI kpi, List<Sample> samples)
-
The rule must also set the sampleFields field to define which sample fields are held by the Sample object. These values are the values used by the rule.
For detailed examples of Sample rules, see Examples - API Sample Rule.
API rules can be defined within the CI Customizations page or the Rule Repository, or using a text file template, as described in Create rules with the Rules API.
The Rules API classes are documented in Javadoc format in the OMi Rules API Reference. These files are located in the following folder:
<OMi_HOME_GW>/AppServer/webapps/site.war/amdocs/eng/API_docs/Rules_API/index.html
To define a Sample rule by using the CI Customizations page or within the Rule Repository, fill in the fields as follows:
-
KPI Calculation Script. Enter the calculateKPI method implementation. Do not enter the method signature. The parameters ci, kpi, and samples of the calculateKPI method are available for use in this script.
-
Maximum number of samples. By default only the most recent sample is included (default=1). You can use this field to change this setting.
For detailed instructions, see Define an API rule in the CI Customizations page or Define an API rule in the rule repository.
To define a Sample rule using a text file template, use the DashboardSampleRuleTemplate.groovy template file as described in Create a text file-based API rule.
Within the text file, enter the calculateKPI method body, and define the sampleFields field.
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: