Automic Workload Automation

  • 1.  How to automate the decommissioning of Agents

    Posted Jun 15, 2018 03:42 AM

    When a server is being decommissioned, the Agent running on that server also needs to be removed inside the AE. Has anyone any good ideas on how to automate or semi-automate that?

     

    When an Agent is being used one or more Clients and perhaps even in multiple objects (jobs, workflows, etc.) within those clients, that agent naturally needs to be removed from those objects as well as Clients. This can be achieved by manually searching (right-click the Agent in each Client and select 'Search for use', but this approach is slow and time consuming.

    We want to get rid of such manual work and are now looking into how this can be automated.

     

    Does anyone have any good ideas on how to do this - either fully or semi-automatic??

     

    /Keld.



  • 2.  Re: How to automate the decommissioning of Agents

    Posted Jun 28, 2018 10:10 AM

    Hi all,

     

    Step 1 was to get a list of JOBS where agent CMA1CS0373 is used:

     

    select a.oh_name "Object",
    a.oh_otype "Job type",
    a.oh_client "Client",
    b.jba_hostdst "Host",
    a.oh_lastdate "Div"
    from uc4admin.oh a,
    uc4admin.jba b
    where a.oh_idnr = b.jba_oh_idnr
    and b.jba_hostdst like upper('cma1cs0373')
    and a.oh_deleteflag = 0
    and b.jba_hostdst not like '<%'
    order by oh_client,jba_hostdst, oh_name

     

    vara preview would look something like this:

     

    Step 2 would be to remove the Agent from all of the above JOBS.

     

    My question is: Is it possible via script, SQL, commands or similar to remove the reference to the agent from those JOBS ?



  • 3.  Re: How to automate the decommissioning of Agents

    Posted Jun 29, 2018 10:47 AM

    Hi Keld,

     

    just my 2 cents to think about:

     

    Your SQL catches only jobs that do have the agent hardcoded in host field.
    it should be removed from HOSTG and config VARAs as well.
    Possibly is set by script as well? This should be taken into consideration.

     

    You could create an SQL to catch all historic Runs querying the AH table for the agent to delete.

     

    The actual removal of the Agent object can be done manually or via JAVA API call thru client 0.

     

    remove the agent binary must be done seperately (I am afraid manually)

     

    cheers, Wolfgang