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 |
|
- Command-Line Interfaces
- BBCTrustServer Command-Line Interface
- ConfigExchange Command-Line Interface
- ConfigExchangeSIS Command-Line Interface
- ConnectedServer Command-Line Interface
- ContentAutoUpload Command-Line Interface
- ContentManager Command–Line Interface
- ConfigWsTool Command-Line Interface
- opr-agt Command-Line Interface
- opr-archive-events Command-Line Tool
- Policy Management CLI workflows
- opr-assign Command-Line Interface
- opr-cert-mgmt Command-Line Interface
- opr-ci-list Command-Line Interface
- opr-close-events Command-Line Tool
- opr-config-tool Command-Line Interface
- opr-downtime Command-Line Interface
- opr-internal-tls-config Command-Line Interface
- opr-jobs Command-Line Interface
- opr-mp-installer Command-Line Interface
- opr-node Command-Line Interface
- opr-package-manager Command-Line Interface
- opr-script Command-Line Interface
- opr-sis-file-manager Command-Line Interface
- opr-template Command-Line Interface
- opr-tls-config Command-Line Interface
- opr-tool Command-Line Interface
- opr-user Command-Line Interface
opr-template Command-Line Interface
The opr-template command-line interface enables you to edit policies outside of the OMi policy editor interface. With the tool, you can download a policy from OMi to a location in your file system, then edit the policy and upload it again. opr-template can also manage the creation of new versions of the policy when it has been edited outside of the policy editor interface, if desired. You can also use opr-template to delete or list templates and aspects.
Location
<OMi_HOME>/opr/bin/opr-template.[bat|sh]
Synopsis
opr-template -help|-example|<CONNECTION_INFO>|<operation>

-rc_file <file> &| -username <login name> [ -password <password> | -smartcard | -winCrypto | -jks <keystore path> -jksPassword <keystore password> ] [[-port <port>] [-server <gatewayserver>] [-ssl] | [-u <URL>]]
Note If <CONNECTION_INFO>
is omitted, the command is executed on the server to which you are logged on.
Option | Description |
---|---|
{-rc_file | -rcf }<file>
|
Location of your credential store. Values for your username, password, java keystore location, and java keystore password can be defined here, enabling you to run commands without having to specify the values individually each time. Use the options -list_rc , -set_rc , and -delete_rc to work with the file. The default file is <OMi_HOME>/.opr-cli-rc . If this option is not specified, then commands automatically check the default file location for credentials. You must specify this option if your credential store file is in a non-default location. If this file does not exist or does not contain the correct settings, you must manually specify the credentials using the other command options. |
{-list_rc| -lrc} [-rc_file <file>]
|
Display the content of the file from which credentials are read. The file contains fields for java keystore, keystore password, username and password, and is encrypted by a hardcoded key. |
{-set_rc | -src} <key>=<value> [-rc_file <file>]
|
Configure one setting in the file from which credentials are read. Specify the setting and the new value by using a key=value pair. For example, -set_rc password=<password string> . |
{-delete_rc | -drc} <setting> [-rc_file <file> }
|
Delete setting from file from which credentials are read. Possible settings are username, password, jks, and jksPassword. |
{-username|-user} <login name>
|
Sets the login name of the user required to execute CLI operations on the target gateway server. |
{-password|-pw} <password>
|
Sets the password for the specified user. If using SSH on Cygwin, either enter the password in free text or use other communication methods, for example Java keystore, Windows keystore, or smart card authentication. Default value: empty string |
{-smartcard|-sc}
|
Use certificate stored on smart card or security token for authentication. When OMi is configured to use CAC authentication, the CLI tools under For more information, see Using command-line tools when client certificate enforcement is used. |
{-winCrypto|-wc}
|
If OMi is configured for TLS mutual authentication, this option specifies to use the Windows certificate store for authentication. The certificate store must hold exactly one client certificate, which OMi will use to authenticate the user. This option is only available on Windows systems. For details, see Configure Client Certificate or Smart Card Authentication. |
{-jks|-j} <keystore path>
|
If OMi is configured for TLS mutual authentication, this option can be used to specify the Java keystore to be used for authentication. The keystore must hold exactly one client certificate, which OMi will use to authenticate the user. Note It is not necessary that the client certificate contains the flag "Smart Card Logon (1.3.6.1.4.1.311.20.2.2)" in the "Enhanced Key Usage" field. For details, see Configure Client Certificate or Smart Card Authentication. |
{-jksPassword|-jp} <keystore password>
|
Password for accessing the Java keystore. |
{-port|-p} <port>
|
Uses port Default: |
-server <GatewayServer>
|
Sets the target gateway server, using Default: FQDN of the OMi gateway server |
-ssl |
When this option is specified, the HTTPS protocol is used to connect to the target gateway server. If omitted, the HTTP protocol is used. Cannot be used in conjunction with the |
{-url|-u} <url> |
Sets the target gateway server, using Default: |
Options

opr-template <CONNECTION_INFO>{ -upload -input <directory or policy header file> [-mode <mode>] | -download -output <directory><object Specifier> | -check -input <directory or policy header file> | -list [<objectspecifier>] [-format xml] | -delete [<object Specifier>] [-format xml]}
<object Specifier>
consists of: [-type <template|aspect>] {-id <versionID> | -name <name> [-object_version <version> | -all] }
Option | Description |
---|---|
{-all} |
Apply operation to all policy template versions for a specified policy template name. Note The |
{‑check|‑c} |
Check policy template(s) in the a file system for syntactical correctness. |
{‑delete|-del}
|
Delete policy template(s). If If |
{‑download|-dl}
|
Download policy template(s) from OMi to a file system. |
{‑format|-f} <xml |x>
|
Return xml result. Can be used with options -list and -delete . |
{-input|-i} [<directory or policy header file>]
|
Specify the directory from which to read data. Alternatively, a policy header file ending in _header.xml . |
{‑id} <UUID>
|
Specify an object (policy template version) in the OMi database by its ID. |
{‑list|-l}
|
List policy templates. If no If If |
|
Specify Specify |
|
Specify an object (policy template) in the OMi database by its name. |
|
Specify the directory in which to store the downloaded data. |
|
Specify the version on a policy template in the OMi database. If no |
|
Specify the type of object to be downloaded. Choose between an aspect or a template. If no type is specified, template is selected by default. |
|
Upload policy template(s) from a file system to OMi. |
Usage
Use opr-assign, opr-config-tool and opr-template together for an end-to-end CLI policy management workflow. For details, see Policy Management CLI workflows.

You can download and upload policy templates individually or in chunks. The downloaded policies are located in the directory specified with the option -output
, and their file names begin with their version ID. For the download and the upload, the CLI commands list the policies that were affected.
Example:
Run: opr-template -download -name "OMi Bus Logfile" -output .
Command output: "OMi Bus Logfile" 2.11 1aa582bf-379b-411e-a9a1-10bf41f2a648
After downloading a policy template, a delta file in the format <versionID>_delta.xml
is created. This file is used for internal purposes and controls when a policy is uploaded. With the delta file, OMi detects policy modifications. When the file is not there, OMi assumes that an upload must happen and creates a new version, even if the exact same policy is already in the database.
You can repeatedly edit the same policy files in the file system. Policy versioning is done as follows:
opr-template
checks if the version already exists in the database.- If yes, OMi increases the highest existing version by 1 and uses it for the new policy version to be stored in the database.
- If no, OMi stores the new version in the database using the given number.
The upload auto-detects which policies were modified and ignores the rest. The upload also takes the policy IDs (version and container ID) into account, but the policy name and version are higher prioritized. HPE recommends to specify the policy name and version instead of the ID.

A policy templates consists of three parts. Each part is reflected as a separate file in the file system:
<versionID>_header.xml
: the policy header, containing general information like the policy template name, version, type, required instrumentation, categories, and the supported operating systems.<versionID>_data
: the crucial part of a policy, containing log file patterns, SNMP trap match conditions, and monitoring thresholds.<versionID>_params.xml
: the customizable list of parameters a policy exposes. If you regard a policy as a black box, the parameters are the screws to fine-tune it.
You can edit all three parts of a policy template. For a syntax description of the individual elements, see Review the policy syntax.
HPE recommends that you should first create a policy template in the UI, download it into the file system and then modify the policy. It is not recommended to write a policy from scratch in the file system.
The following work flow example shows the creation and editing process of a new policy named my OMi Bus Logfile
, derived from the out-of-the-box policy OMi Bus Logfile
.
-
Download the policy by running the following command:
opr-template -download -name "OMi Bus Logfile" -output .
Command output:
"OMi Bus Logfile" 2.11 1aa582bf-379b-411e-a9a1-10bf41f2a648
-
Edit the policy template files.
In the files
./1aa582bf-379b-411e-a9a1-10bf41f2a648_header.xml
and./1aa582bf-379b-411e-a9a1-10bf41f2a648_data
, replace the string "OMi Bus Logfile" with "my OMi Bus Logfile". -
Upload the policy.
opr-template -upload -input .
Command output:
"my OMi Bus Logfile" 2.11 68a3eb63-28c6-472f-95e2-35b0e9155fb8
INFO: upload summary: total=1, ok=1, failed=0, skpped=0, ignoredStubs=0 -
Optional. Change the version.
- Assume you forgot to set the desired version number, for example 2.0. Again edit the header file
./1aa582bf-379b-411e-a9a1-10bf41f2a648_header.xml
. Replace the string "2.11" with "2.0". -
Reupload the file:
opr-template -upload -input .
Command output:
“my OMi Bus Logfile" 2.0 b093cabb-0cae-4014-b72a-957d765dd75b
INFO: upload summary: total=1, ok=1, failed=0, skpped=0, ignoredStubs=0 -
As the version 2.11 is not needed, run the following command:
opr-template -delete -name "my OMi Bus Logfile" –object_version 2.11
Command output:
Deleted "my OMi Bus Logfile" 2.11 68a3eb63-28c6-472f-95e2-35b0e9155fb8
- Assume you forgot to set the desired version number, for example 2.0. Again edit the header file

The command option -check
validates the policy syntax. The syntax check is also included in the -upload
option.
The -check
option behaves as follows:
-
Searches for errors in all parts of a policy template (data, header, and parameter).
-
Can check individual policy templates or can check all policies in a directory.
-
If a policy contains multiple errors, only the first error is shown.
-
Contacts the OMi backend per web service to do the validation.
-
Behavior for mass uploads or bulk syntax checks: if one error is found, the
opr-template
CLI returns the code!= 0
.
For serious problems (like communication errors or certificate issues), the command returns immediately, whereas for recoverable errors (like policy syntax errors) the command continues and prints a summary line.
Example:
opr-template -check -input .
Command output:
ERROR: Syntax check for 'Sys_MSWindowsWebMgmtToolsRoleMonitor' 9.9 failed.
line 14 column 1:
missing EOF at 'xx'.
INFO: Syntax check for 'Virt_OracleSolarisZoneCPUEntlUtilMonitor-AT' 1.0 is OK.
INFO: Syntax check for 'Virt_OracleSolarisZoneSwapUtilMonitor-AT' 1.0 is OK.
INFO: Syntax check for 'Virt_OracleSolarisMemoryEntlUtilMonitor-AT' 1.0 is OK.
INFO: syntax-check summary: total=4, ok=3, failed=1, ignoredStubs=0
Restrictions
Non-admin users also need the following file permissions to operate this command-line tool:
File | Windows Permissions | Linux Permissions |
---|---|---|
<OMi_HOME>/conf/TopazInfra.ini |
read | r |
<OMi_HOME>/log/opr-clis.log |
full control | rw |
Note: This file is not available on gateway server systems.
|
full control | rw |
<OMi_HOME>/conf/encryption.properties |
read | r |
<OMi_HOME>/conf/seed.properties |
read | r |
Examples
-
List information about the latest version of the aspect called "OpsConnector for Datadog Configuration Aspect":
opr-template -list -type aspect -name "OpsConnector for Datadog Configuration Aspect"
-
List information about version 1.0 of the aspect called "OpsConnector for Datadog Configuration Aspect":
opr-template -list -type aspect -name "OpsConnector for Datadog Congiuration Aspect" -object_version 1.0
-
List all versions of the policy template called "OpsConnector for Datadog Configuration"
opr-template -list -type template -name "OpsConnector for Datadog Configuration" -object_version -all
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: