Managing objects in the object repository with the CLI

The repomgr command can be used to manage objects in the object repository. Similar operations can be accomplished with this command as in the Object Repository tab in the Monitor Console.

There are three forms of this tool:

  • A set of commands that take a set of objects and perform some action. The set of objects is defined by a query against the object repository or imported from a file. The most basic action is to simply output the list of objects or export them to a file.
  • A set of commands that performs some action on an individual object. The object is defined by its object identifier (oid) which can be obtained from a query against the object repository.
  • A set of commands that apply to an agent or object on an agent.
 Click to view examples of how to use the CLI to manage the Object Repository...

Note that options where the value contains spaces or exclamation marks ! should be quoted. On Windows, a double quote (") should be used and on UNIX platforms a single quote (').

Show all queues that are monitored

repomgr –p BMCSOFTWARE --query-monitored --query-type-name "ComMQSoftwareWebSphereMQLocalQueue" --action-show SA

Show all queue managers

repomgr –p BMCSOFTWARE --query-objects --query-type-path "ComMQSoftwareNetworkHost!ComMQSoftwareWebSphereMQQueueManager" --action-show SA

Show all queues whose stable attributes have been changed after the first of the year and still exist (confirmed)

repomgr –p BMCSOFTWARE --query-changed-after "2014-01-01 00:00:00" --query-state confirmed --query-type-name "ComMQSoftwareWebShereLocalQueue" --action-show SA

Mark all queues under the agent TEST1 AND queue manager QM1 as not found if they have not been confirmed in the last hour (3600 seconds)

repomgr –p BMCSOFTWARE --query-path-prefix "TEST1!QM1" --query-type-name "ComMQSoftwareWebSphereMQLocalQueue" --action-not-found 3600 SA

Register a local queue named Q1 on an agent named TEST1 and queue manger named QM1

repomgr -p BMCSOFTWARE --query-path-prefix "TEST1!QM1!Q1" --query-type-name "ComMQSoftwareWebSphereMQLocalQueue" --action-register SA

Get the oid of a local queue named Q1 on an agent named TEST1 and queue manger named QM1

repomgr -p BMCSOFTWARE --query-path-prefix "TEST1!QM11!Q1" --query-type-name "ComMQSoftwareWebSphereMQLocalQueue" --action-show --show-oid SA

Use oid to unregister an object

repomgr -p BMCSOFTWARE --object-unregister "1_56_41" SA

Discover objects of a specific queue manager named QM1 on an agent named TEST1

repomgr -p BMCSOFTWARE --discover-inst-path "TEST1!QM1" --discover-type-path "ComMQSoftwareNetworkHost!ComMQSoftwareWebSphereMQQueueManager" SA

Discover objects of all queue managers on an agent named TEST1

repomgr -p BMCSOFTWARE --discover-inst-path "TEST1!*" --discover-type-path "ComMQSoftwareNetworkHost!ComMQSoftwareWebSphereMQQueueManager" SA

Discover objects of an agent named TEST1 (Only those extensions that support and are configured for discovery would respond to this type of discovery)

repomgr -p BMCSOFTWARE --discover-agent "TEST1" SA

Show the results of the last discovery or reconfirm

repomgr -p BMCSOFTWARE --results-show SA

Clear the results

repomgr -p BMCSOFTWARE --results-clear SA


Was this page helpful? Yes No Submitting... Thank you

Comments