Question

1
Replies
12
Views
Sheeba Christuraj (SheebaC1)
HCL
Sheeba Christuraj
HCL
IN
SheebaC1 Member since 2013 1 post
HCL
Posted: November 3, 2020
Last activity: November 3, 2020
Posted: 3 Nov 2020 7:40 EST
Last activity: 3 Nov 2020 10:16 EST

pzCheckSearchAgentStatus activity

Hi ,

Could any one tell me what is this  Java code is all about and if this code can we used for monitoring agents in multinode 

 

PRSystemSettings systemSettings = pega.getSystemSettings(); boolean prevStatus = Boolean.valueOf(systemSettings.getDynamic("Pega-RULES", "indexing/searcherror")).booleanValue();

allMailAddresses=""; emailAccount = ""; boolean agentError = false;  com.pega.pegarules.pub.context.AgentUtils agentUtils = tools.getAgentUtils(); com.pega.pegarules.pub.util.StringMap systemPulse = agentUtils.getQueue("Pega-RULES", 1); com.pega.pegarules.pub.util.StringMap systemIndexer = agentUtils.getQueue("Pega-RULES", 2); com.pega.pegarules.pub.util.StringMap systemWorkIndexer = agentUtils.getQueue("Pega-RULES", 5);

agentError = systemPulse == null || !Boolean.valueOf(systemPulse.getString("IsEnabled")).booleanValue() || !"".equals(systemPulse.getString("LastExceptionData")); agentError = agentError || systemIndexer == null || !Boolean.valueOf(systemIndexer.getString("IsEnabled")).booleanValue() || !"".equals(systemIndexer.getString("LastExceptionData")); agentError = agentError || systemWorkIndexer == null || !Boolean.valueOf(systemWorkIndexer.getString("IsEnabled")).booleanValue() || !"".equals(systemWorkIndexer.getString("LastExceptionData"));

Hi ,

Could any one tell me what is this  Java code is all about and if this code can we used for monitoring agents in multinode 

 

PRSystemSettings systemSettings = pega.getSystemSettings(); boolean prevStatus = Boolean.valueOf(systemSettings.getDynamic("Pega-RULES", "indexing/searcherror")).booleanValue();

allMailAddresses=""; emailAccount = ""; boolean agentError = false;  com.pega.pegarules.pub.context.AgentUtils agentUtils = tools.getAgentUtils(); com.pega.pegarules.pub.util.StringMap systemPulse = agentUtils.getQueue("Pega-RULES", 1); com.pega.pegarules.pub.util.StringMap systemIndexer = agentUtils.getQueue("Pega-RULES", 2); com.pega.pegarules.pub.util.StringMap systemWorkIndexer = agentUtils.getQueue("Pega-RULES", 5);

agentError = systemPulse == null || !Boolean.valueOf(systemPulse.getString("IsEnabled")).booleanValue() || !"".equals(systemPulse.getString("LastExceptionData")); agentError = agentError || systemIndexer == null || !Boolean.valueOf(systemIndexer.getString("IsEnabled")).booleanValue() || !"".equals(systemIndexer.getString("LastExceptionData")); agentError = agentError || systemWorkIndexer == null || !Boolean.valueOf(systemWorkIndexer.getString("IsEnabled")).booleanValue() || !"".equals(systemWorkIndexer.getString("LastExceptionData"));

if(prevStatus^agentError) {     if(agentError)         searchBroken=true;     else         searchBroken=false;     allMailAddresses = systemSettings.getDynamic("Pega-RULES", "indexing/emailaddresses");     emailAccount = systemSettings.getDynamic("Pega-RULES", "indexing/emailaccount");

Pega Decision Strategy Manager 7.3.1 Decision Management Financial Services System Architect