Automic Workload Automation

 View Only
  • 1.  DELETE AGENT from admin window

    Posted Feb 09, 2024 10:41 AM

    Hello

    Can you tell me how to delete Agents from administration window once there are on termined state ?

    I would like to do it in a scri after the terminate command .

    :TERMINATE ,<agent name>

    ! Agent is stopped now ,  delete from administration window

    I tried to do :SET &RET# = REMOVE_OBJECT(<agent name>)

    But it didn t delete it .

    Any clue ? 

    Regards,



    ------------------------------
    Best regards,

    Sabine
    ------------------------------


  • 2.  RE: DELETE AGENT from admin window

    Posted Feb 09, 2024 01:52 PM

    Hi @Sabine Arthur

    It actually should be possible to remove an agent using REMOVE_OBJECT, at least the Online-Help doesn't say, it won't work. But that is no guarantee...
    I would try it with a REST or java API call.

    REST-Example:

    curl -k -X --location --request DELETE --header "Content-Type: application/json" --header "Authorization: Basic UkVTVF9DQUxML0FQSTp1YzQ="  "http://182.165.171.111:8090/ae/api/v1/1000/system/agents/AGENT.JMX.REMOVAL_TEST" 
    


    Cheers
    Christoph 



    ------------------------------
    ----------------------------------------------------------------
    UC4/Automic Automation Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 3.  RE: DELETE AGENT from admin window

    Posted Feb 11, 2024 03:41 AM

    Hello Christoph, 

    Thanks for the information. I need a little more details on "Authorization: Basic xxx".
    What user / account is this ? Do you have any document page details from broadcom ? 



    ------------------------------
    Regards,
    Prosenjit
    ------------------------------



  • 4.  RE: DELETE AGENT from admin window

    Posted Feb 12, 2024 02:50 AM
    Edited by Christoph Rekers Feb 12, 2024 02:59 AM

    Hi @PROSENJIT MAJI,

    You can encode a user name and its password in Base64 format using this page:
    https://www.base64encode.org/

    You simply enter a Automic User objects name plus department and the password in this format:

    user/department:password_in_clear_text


    Cheers

    Christoph 



    ------------------------------
    ----------------------------------------------------------------
    UC4/Automic Automation Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 5.  RE: DELETE AGENT from admin window

    Posted Feb 11, 2024 12:41 AM

    Hello Sabine,

    I have tried REMOVE_OBJECT function to delete agents. It doesn't delete agent with following log. 

    2024-02-10 23:32:32 - U00020408 0000000000020645

    Return codes
    "0" - Deletion was successful.
    "20645" - This object does not exist.
    "20217" - This object is currently open for editing purposes.
    "20369" - The object is in the Transport Case.

    As the agents are actually objects under Client 0, I think REMOVE_OBJECT cant find the agent as an objects under the current client. 



    ------------------------------
    Regards,
    Prosenjit
    ------------------------------



  • 6.  RE: DELETE AGENT from admin window

    Posted Feb 12, 2024 02:52 AM
    Edited by Christoph Rekers Feb 12, 2024 02:53 AM

    I don't think it's because the object is located in client zero, because you can manually delete an agent in any client. I think that's something that simply hasen't been tested...and now works as designed ;-)


    Cheers

    Christoph 



    ------------------------------
    ----------------------------------------------------------------
    UC4/Automic Automation Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 7.  RE: DELETE AGENT from admin window

    Posted Apr 09, 2024 01:34 AM
    Edited by PROSENJIT MAJI Apr 09, 2024 01:35 AM

    Hello Christoph, 

    Thanks for the details earlier. I feel using REST & Java API call its best for now. 

    I see following details in Automic document. I think this is why UC4 function REMOVE_OBJECT is NOT working for my testing environment. 

    https://docs.automic.com/documentation/webhelp/english/AA/21.0/DOCU/21.0.9/Automic%20Automation%20Guides/Content/AWA/AdministrationPerspective/AG_Wkg_With_Agents.htm?Highlight=DELETE%20AGENT
    ----------------------------------------------------
    Excerpt from the document :
    Renaming/Deleting an Agent

    You can rename and/or delete Agents from the Agents list in any Client that you have access to, given the following applies:
     
    You have write (W) permissions on the Agent
    No tasks are running on the Agent
    The Agent is inactive
    The Agent is not used in multiple Clients
    Note: If you try to rename or delete an Agent that is used in multiple Clients, an error message is displayed.
    To rename and/or delete an Agent, right-click it and select Rename/Delete.
    -----------------------------------------------------



    ------------------------------
    Regards,
    Prosenjit
    ------------------------------