How to create a new host group and add Control-M Agent Node ID to it using a command line?

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    Control-M/Server for UNIX and Microsoft Windows


    COMPONENT:

    Control-M/Server for UNIX and Microsoft Windows


    APPLIES TO:

    All versions of Control-M/Server for UNIX and Microsoft Windows



    QUESTION:

    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:

    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

    Note: 
    - 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 


    Article Number:

    000118215


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles