Develop > Command-Line Interfaces > opr-package-manager Command-Line Interface

opr-package-manager Command-Line Interface

You can use the opr-package-manager command-line interface (CLI) to manage and deploy HPE Software deployment packages in Monitoring Automation.

After uploading an HPE Operations Agent deployment package, you can update already existing HPE Operations Agent installations with later versions (full version or patch version) or with agent hotfixes of the same version. For more information, see Monitored Nodes.

You can also use the tool to list the deployment packages that are available in Monitoring Automation, to deploy packages, and to delete a deployment package from the server.

Learn More

Location

<OMi_HOME>/opr/bin/opr-package-manager.[bat|sh]

You can run opr-package-manager on a gateway or a data processing server. The server processes must be running.

Synopsis

opr-package-manager [<CONNECTION_INFO>] {<toolInfo> | <operation> | <target>}

Options

Exit Status

Exit Status

Description

Output

0

Successful completion of the requested operation

No output.
1

Failure of the requested operation

An error message stating why the operation failed, followed by the tool's help text.
300‑399

HTTP Redirection (300-399)

An error message stating the HTTP error number and description.

For more information about HTTP error status values, see publicly available HTTP documentation.

400‑499

HTTP Client Error (400-499)

500‑599

HTTP Internal Server Error (500-599)

Restrictions

  • Authentication. Some operations require authentication. If <authentication> is required, <authentication> must be specified and valid.

    If <authentication> is omitted when requesting an operation requiring authentication, opr-package-manager does not execute the requested operation, and exits with the following error:

    Username may not be null. Operation requires authentication. Please enter the login name and password.

    The error can be fixed by inserting an <authentication>.

  • Permissions. The user running the opr-package-manager command-line interface must be an OMi user with Monitored Nodes access rights. For more information, see Monitored Nodes and Users, Groups, and Roles.

    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

    <OMi_HOME>/log/opr-pgctl.log

    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
  • Prerequisites. To run opr-package-manager successfully, the server processes must be running.

Examples

This section shows a number of examples you can use as a starting point for developing your own opr-package-manager commands.

  • List all available deployment packages:

    opr-package-manager ‑username myU ‑password myPwd ‑list_packages > allpkg.xml

  • Recursively upload the HPE Operations Agent deployment packages for all platforms (starting from the current working directory):

    opr-package-manager ‑username myU ‑password myPwd ‑upload_packages

  • Upload the HPE Operations Agent deployment packages for Windows monitored nodes from the file system:

    opr-package-manager ‑username myU ‑password myPwd ‑upload_packages c:\Agent\OVO-Agent.xml ‑input c:\Agent\packages\ ‑platform WIN

  • Deploy the HPE Operations Agent deployment package version 11.14.005 to the nodes node1.example.com and node2.example.com:

    opr-package-manager ‑username myU ‑password myPwd ‑deploy_package Operations-agent ‑deploy_mode VERSION ‑package_ID 11.14.005 ‑node_list "node1.example.com,node2.example.com"

  • Deploy the latest hotfix for the HPE Operations Agent to all nodes selected by the TQL query All_CIs_with_OM_Agents_Unix:

    opr-package-manager ‑username myU ‑password myPwd ‑deploy_package Operations-agent ‑deploy_mode CURRENT ‑query_name All_CIs_with_OM_Agents_Unix

  • Delete the HPE Operations Agent deployment package from the database:

    opr-package-manager ‑username myU ‑password myPwd ‑delete_package Operations-agent

  • Delete the HPE Operations Agent deployment package version 11.14.005 from the database:

    opr-package-manager ‑username myU ‑password myPwd ‑delete_package_version Operations-agent 11.14.005

Troubleshooting