Question
BITSINGLASS
IN
Last activity: 8 Oct 2017 8:42 EDT
Getting Agent Details by Using an API method
1) I want to know the last run time and other details of an agent for all the nodes.can i use the below method for the same?
java.util.Map<java.lang.String,java.lang.Object> getAgentDetails(java.lang.String aRuleSetName,java.lang.String qName)
2) I want to understand that how can we take the details into clipboard which is returned by getAgentDetails method ?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
I'd caution against using this method as it is an internal Pega api and we neither describe its usage nor promote it in any way. The method implementation also changes across different releases so you will find yourself with a situation when keeping up with Pega.
BITSINGLASS
IN
Dheer , Could you please let me know if there any other way to achieve the same.
Pegasystems Inc.
US
Hi,
You may consider using the PRPC MBean API. The PegaRULES MBean’s JMX API Javadoc is available and shipped under the following directory of the PRPC distribution media –
{PRPC_Distribution_Home}\Documentation\MBeanJMXJavadoc.zip. Unzip this to a temp location and refer to the Javadoc by opening the index.html. The API doc that you need to refer to for managing PRPC AgentManagement MBean's state is under the com.pega.pegarules.management.AgentManagement class.
Reviewing and referring to the API docs you can write your own custom code/script to manage the state of the Agents, simply because it’s freely accessible using JMX client code. For example, I have attached a sample JMX Client java class (WasJMX.java) where I query and print the formal parameters and return types of the operations on the ListenerManagement MBean. Please note that this is just a sample client code meant for your reference purposes only. To compile and run the java I had to add the following WAS runtime .jars (com.ibm.ws.admin.client_6.1.0.jar and com.ibm.ws.webservices.thinclient_6.1.0.jar) to the system CLASSPATH. Also, here’s the output from my local system for this MBean:
Initializing connection to MBean server : Host - PCDASA2W7 Port - 8885
SOAP - HOST: PCDASA2W7 PORT: 8885
Established AdminClient: SOAP
Hi,
You may consider using the PRPC MBean API. The PegaRULES MBean’s JMX API Javadoc is available and shipped under the following directory of the PRPC distribution media –
{PRPC_Distribution_Home}\Documentation\MBeanJMXJavadoc.zip. Unzip this to a temp location and refer to the Javadoc by opening the index.html. The API doc that you need to refer to for managing PRPC AgentManagement MBean's state is under the com.pega.pegarules.management.AgentManagement class.
Reviewing and referring to the API docs you can write your own custom code/script to manage the state of the Agents, simply because it’s freely accessible using JMX client code. For example, I have attached a sample JMX Client java class (WasJMX.java) where I query and print the formal parameters and return types of the operations on the ListenerManagement MBean. Please note that this is just a sample client code meant for your reference purposes only. To compile and run the java I had to add the following WAS runtime .jars (com.ibm.ws.admin.client_6.1.0.jar and com.ibm.ws.webservices.thinclient_6.1.0.jar) to the system CLASSPATH. Also, here’s the output from my local system for this MBean:
Initializing connection to MBean server : Host - PCDASA2W7 Port - 8885
SOAP - HOST: PCDASA2W7 PORT: 8885
Established AdminClient: SOAP
PRPC MBeans Found: 41
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ModuleVersionReport,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.AgentManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.GlobalDBTraceManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.RequestorManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.AdvancedConfigurationManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.SystemQueueManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ListenerManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.Reports,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.IndexManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.RuleUtilityLibraryExtractor,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.DatabaseManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.DatabaseTableInfo,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.PulseStatus,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.DeclarativeRulesManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ClassLoaderManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ConfigurationManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.priv.management.web.WebTierRuntimeEnvironment,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ResourceAdaptorLogging,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.priv.management.web.ServletManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ETierThreadManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.AppCentricCacheManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.LogFileAccess,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.DictionaryCache,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.MemoryManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.priv.management.web.WebTierStaticContentManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.LoggingLevelSettings,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.DeclarativePageCacheManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.RuleAssemblyCacheManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ETierRuntimeEnvironment,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.RequestorPools,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.RemoteTracing,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.GarbageCollectorAndLogUsage,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.AuthorizationManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.ETierStaticContentManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.SystemSettingsInfo,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.SystemManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.PassivationManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.RemoteLogging,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.UppercasedCache,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.management.internal.RuleCacheManagement,id="3a1692ef100a456463ac722c98640e61"
com.pega.PegaRULES:type=web,name=com.pega.pegarules.priv.management.web.WebTierThreadManagement,id="3a1692ef100a456463ac722c98640e61"
BITSINGLASS
IN
Das,
Thank you for the reply. we tried to verify the path whatever you provided but couldn't find any such document path. Could you please let me know which pega version you are referring to . we are using Pega 7.1.6 . Please let me know if there is any other API or OOTB feature which can be used for the same purpose.
looking forward for your reply
regards