Nathan Moore (NathanM0)
Nathan Moore
NathanM0 Member since 2014 6 posts
Posted: August 26, 2020
Last activity: August 26, 2020
Posted: 26 Aug 2020 14:31 EDT
Last activity: 26 Aug 2020 15:28 EDT

Getting Agent Status from a DB Query

Use Case: I want to alarm on Agent Run Status based on DB Query.

If you go to:

Designer Studio => System => Operations => Agents => Specific Agent from the list

The Agent Detail Tab will display the following properties:

pyDisplayHarness.pyAgentNodes(1)  Name      Value  pxObjClass      Embed-AgentNodes  pyStatus      Running  pyNodeName      ????  pyLastDateRun      ????  pyTimeToComplete      ????  pyNodeID      ????

For the purposes of Alarming and Operational Support I want to run a query on the DB periodically to check on the status of a few critical agents.

Is it possible?

By digging into the tracer we found this query:

FROM data.pr_index_data_agents da,
     data.pr_sys_statusnodes ssn
WHERE da.pxInsIndexedClass = 'Data-Agent-Queue'
AND   da.pyAgentName = ?
AND   da.pyRuleSet = ?
AND   UPPER(da.pyNodeName) = UPPER(ssn.pySysNodeID)
AND   UPPER(ssn.pySystemName) = ?;

But this query yields only scheduling details, not execution details?

Thanks in advance for the help!

:) -nate


***Edited by Moderator Marissa to update Content Type from Discussion to Question***

Pega Platform 7.1.8 DevOps Cross-Industry QA Specialist