Develop > Command-Line Interfaces > ConfigExchange Command-Line Interface

ConfigExchange Command-Line Interface

You can use the ConfigExchange command-line interface (CLI) for the following tasks:

  • Migrating policies from the OM to Monitoring Automation. These tasks make use of operations referred to in this section as <omOperation>.
  • Development and management of instrumentation packages:

    • Creating a compatible file structure for instrumentation development.

    • Uploading and downloading instrumentation packages or elements thereof. An element of an instrumentation package can be the base package, a patch or a hotfix.

    These tasks make use of operations referred to in this section as <instrumOperation>.

Location

<OMi_HOME>/opr/bin/ConfigExchange

Synopsis

ConfigExchange [<CONNECTION_INFO>] {<toolInfo> | <omOperation> | <instrumOperation>}

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

Some operations require authorization. The specified user must be an OMi user with permission to create policy templates. If <CONNECTION_INFO> is required, <CONNECTION_INFO> must be specified and valid.

If <CONNECTION_INFO> is omitted when requesting an operation requiring authentication, ConfigExchange 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 <CONNECTION_INFO>.

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

Examples

This section shows a number of real-life examples you can use as a starting point for developing your own ConfigExchange commands.

  • Upload Instrumentation, Policies and Policy Groups from HPOM

    A policy was exported from HPOM to the directory /usr/myOMPolicy. Issue the following command to upload the policy:

    ConfigExchange ‑username myU ‑password myPwd ‑uploadOM ‑input /usr/myOMPolicy

  • Upload Instrumentation Packages, Patches, and Hotfixes

    • A new instrumentation package was prepared in the directory /usr/myCustomInstrum. Issue the following command to overwrite existing instrumentation myInstrum with the new package:

      ConfigExchange ‑username myU ‑password myPwd ‑upload ‑input /usr/myCustomInstrum ‑instrumname myInstrum ‑force

    • A new instrumentation package was prepared in the directory /usr/myCustomInstrum. Issue the following command to upload the new package as a patch for instrumentation myInstrum with patch number 3 and label the patch myFix:

      ConfigExchange ‑username myU ‑password myPwd ‑upload ‑input /usr/mydir ‑instrumname myInstrum ‑patch 3 ‑label myFix

    • A new instrumentation package was prepared in the directory /usr/myCustomInstrum. Issue the following command to upload the new package as a hotfix with name hf_CPUfix for patch number 3 of instrumentation myInstrum, and attach the description MyCP hotfix for patch 3; fix CPU issue:

      ConfigExchange ‑username myU ‑password myPwd ‑upload ‑input /usr/myCustomInstrum ‑instrumname myInstrum ‑hotfix hf_CPUfix ‑forpatch 3 ‑force ‑description "hotfix for patch 3; fixes CPU issue"

    • A new instrumentation package was prepared in the directory /usr/myCustomInstrum. Issue the following command to upload the new package as a hotfix with name hf_CPUfix for the base package of instrumentation myInstrum:

      ConfigExchange ‑username myU ‑password myPwd ‑upload ‑input /usr/myCustomInstrum ‑instrumname myInstrum ‑hotfix hf_CPUfix ‑forpatch 0

  • Download an Instrumentation Package from the Database to the Local File System

    Issue the following command to download the entire package for instrumentation package myInstrum from the database, and place it in directory myDownloads:

    ConfigExchange ‑merge ‑output myDownloads ‑instrumname myInstrum

  • Download the Contents of a Configuration Folder from the Database to the Local File System

    Issue the following command to download the configuration objects in configuration folder myInstrum from the database, and place them in directory myDownloads:

    ConfigExchange ‑download ‑output myDownloads ‑startId 7d6468fb‑486d‑b7cd‑8bff‑f6c26b34c305

  • Download Specific Elements of an Instrumentation Package from the Database to the Local File System

    • Issue the following command to download the base package for instrumentation package myInstrum from the database, and place it in directory myDownloads (patches and hotfixes are not downloaded):

      ConfigExchange ‑username myU ‑password myPwd ‑download ‑output myDownloads ‑instrumname myInstrum

    • Issue the following command to download patch number 1 for instrumentation package myInstrum from the database, and place it in directory myDownloads (the base package and any hotfixes for the patch are not downloaded):

      ConfigExchange ‑username myU ‑password myPwd ‑download ‑output myDownloads ‑instrumname myInstrum ‑patch 1

    • Issue the following command to download hotfix hf_CPUFix for patch number 1 for instrumentation package myInstrum from the database, and place it in directory myDownloads (the base package and the patch the hotfix is for are not downloaded):

      ConfigExchange ‑username myU ‑password myPwd ‑download ‑output myDownloads ‑instrumname myInstrum ‑hotfix hf_CPUFix ‑forpatch 1

    • The same command used in the previous example can be shortened using command element abbreviations, in which case it looks as follows:

      ConfigExchange ‑user myU ‑pw myPwd ‑dl ‑o myDownloads ‑inn myInstrum ‑hf hf_CPUFix ‑fp 1

  • Remove Instrumentation Packages or Elements Thereof from the Database

    • Issue the following command to remove instrumentation package MyInstrum, including all associated patches and hotfixes, from the database:

      ConfigExchange ‑user myU ‑pw myPwd ‑remove ‑instrumname myInstrum

    • Issue the following command to roll back hotfix hf_CPUFix for patch number 1 from instrumentation package MyInstrum (the base package and the patch are not removed):

      ConfigExchange ‑user myU ‑pw myPwd ‑remove ‑instrumname myInstrum ‑hotfix hf_CPUFix ‑forpatch 1

    • Issue the following command to roll back patches with a patch number ≤1 and all their hotfixes (the base package and any patches with a patch number >1 are not removed):

      ConfigExchange ‑user myU ‑pw myPwd ‑remove ‑instrumname myInstrum ‑patch 1

  • Create a Directory Structure to be Used as a Template for Preparing an Instrumentation Package from Scratch with the Intention to Upload It

    Issue the following command to create a directory structure for instrumentation MyInstrum in the directory /usr/myCustomInstrum:

    ConfigExchange ‑createinstrumdir ‑output /usr/myCustomInstrum

  • Investigate Which Patches and Hotfixes are Installed for a Certain Instrumentation Package

    Issue the following command to list all patches and hotfixes for instrumentation myInstrum:

    ConfigExchange ‑username myU ‑password myPwd ‑list ‑instrumname myInstrum

Troubleshooting

Related Topics Link IconRelated Information