Question: - How to create a new host group and add Control-M Agent Node ID to it using a command line? - How to run ctmhostgrp utility in command line? |
Answer: This is the syntax and usage to run ctmhostgrp utility in command line: usage: ctmhostgrp [ -LIST | -EDIT -HOSTGRP -APPLTYPE [ -VIEW | -ADD | -DELETE ] | -DELETE ] Following are some examples for you: 1. To add a new hostgroup and add Control-M Agent into the hostgroup: Run: ctmhostgrp -EDIT -HOSTGRP GENEGRP -APPLTYPE OS -ADD mongoose Result: insert of new application group completed successfully insert completed successfully 2. To list all hostgroup created: Run: ctmhostgrp -LIST Result: List of Groups Application type ================================================== ================ pepe OS pepa OS GENEGRP OS 3. To view all the Control-M Agent in a specific hostgroup: Run: ctmhostgrp -EDIT -HOSTGRP GENEGRP -APPLTYPE OS -VIEW Result: HostGroup Name Host ID ============================================================ GENEGRP mongoose The following video demonstrates this solution:
- Control-M Automation API can be used to define HostGroup and add Control-M Agents into HostGroup as well. For example to adding an Agent to Hostgroup can be done by config server:hostgroup:agent::add, for details please refer to https://docs.bmc.com/docs/automation-api/918/services-783053199.html |