Schedule the agent wobs to the second agent when the first one is down with CA Workload Automation ESP Edition
search cancel

Schedule the agent wobs to the second agent when the first one is down with CA Workload Automation ESP Edition

book

Article ID: 139899

calendar_today

Updated On:

Products

CA Workload Automation ESP Edition

Issue/Introduction

Client wants help for this scenario:
They have two agents installed on two application servers in AWS. Normally agent wobs should be sent to AGENTA, and when AGENTA is down, they want ESP to send to AGENTB. 

Client doesn't have cluster or load balancer to redirect the agent wobs to the second agent.

Environment

Release : 11.4 & 12.0

Component : CA Workload Automation System Agent

Resolution

Here are the steps:

- Define both agents in AGENTDEF, and then issue "OPER LOADAGDF" to make them effective:

   AGENT AGTA ......

   AGENT AGTB ......

 

- Define AGENT_MON for both agents:

AGENT_MON AGTA

  AGENT AGTA

  NOTIFY PNODE(INACTIVE) EVENT(ESP.CHANGE_AGENT)

  STATINTV 5

  MSGQLEN 10

ENDJOB

AGENT_MON AGTB

  AGENT AGTB

  NOTIFY PNODE(INACTIVE)  EVENT(ESP.CHANGE_AGENT)

  STATINTV 5

  MSGQLEN 10

ENDJOB

- Define event ESP.CHANGE_AGENT:

EVENT ID(ESP.CHANGE_AGENT) SYSTEM(-) REPLACE

PROC

IF %MNAGENT EQ 'AGTA' THEN -

 VSET AGENTNAME 'AGTB' TABLE(AGENT)

IF %MNAGENT EQ 'AGTB' THEN -

 VSET AGENTNAME 'AGTA' TABLE(AGENT)

ENDPROC

ENDDEF

 

 

Note: the above command can also be issued manually from ESP page mode if needed.

- Define the global variable table and variable:

VTDEFINE AGENT

VSET AGENTNAME 'AGTA' TABLE(AGENT)

- Use the variable on AGENT statement in ESP Proc:

APPL applname

....

VGET AGENTNAME TABLE(AGENT)

SAP_JOB jobname

....

 AGENT %AGENTNAME

....

ENDJOB

 

Note:

- Normally all agent wobs will be sent to AGTA since it's the value for variable %AGENTNAME;

- When AGENT_MON for AGTA shows Inactive, NOTIFY will fire event ESP.CHANGE_AGENT, which will change

the variable value to AGTB;

- Then new agent wobs will be sent to AGTB.

- From agent side, after the switch, the inactive agent may need to clean up the database file. 

 

 

 

 

 

 

 




Additional Information

For question on shared spool folder, the doc links below show clearly that you can specify spooldir with same location and folder:

https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/intelligent-automation/workload-automation-system-agent/11-4/configuring/configure-the-agent/configure-agent-aliases-for-clustered-environments.html


https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/intelligent-automation/workload-automation-system-agent/11-4/configuring/maintain-spool-and-log-files/spool-file-maintenance.html