Automic Workload Automation

 View Only
Expand all | Collapse all

Programmatically Delete Agent from client 0 if host is destroyed?

  • 1.  Programmatically Delete Agent from client 0 if host is destroyed?

    Posted Mar 01, 2023 10:40 AM

    Hi folks,

    Is it possible to delete an agent programmatically from the engine/client 0 if its host is destroyed using host char EXECUTE_ON_LOST?

    I have many servers with automic agents where the hosts are ephemeral and so are often destroyed and then rebuilt soon afterwards, in such cases the newly installed agent(with same name as previous agent) wont reconnect to the engine unless its deleted from client 0, currently thats a manual process.

    EXECUTE_ON_END i think is only used if the agent is stopped gracefully, so i dont need to take any action on this event.

    Your search for returned result(s). If you think this result is not accurate, clear your browser's cache and try again.

    Automic remove preview
    Your search for returned result(s). If you think this result is not accurate, clear your browser's cache and try again.
    View this on Automic >

    Thanks!



  • 2.  RE: Programmatically Delete Agent from client 0 if host is destroyed?

    Broadcom Employee
    Posted Mar 02, 2023 03:35 AM

    Hi @Tony Ferraro 

    you can use the REST-endpoint /{client_id}/system/agents/{object_name} to delete the Agent.

    REST Delete Agent

    see https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/21.0.5/REST%20API/Automation.Engine/index.html?overrideUrls=../Automation.Engine/swagger.json,../Continuous.Delivery.Automation/swagger.json,../Analytics/swagger.json,../Infrastructure.Manager/swagger.json#/

    Michael