Skip to main content
Version: 7.9


This function is used in Python Scripting.


Returns the current state of the matching agents.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.


system.eam.queryAgentStatus(groupIds, agentIds, isConnected)


ListgroupIdsA list of groups to restrict the results to. If not specified, all groups will be included.
ListagentIdsA list of agent names to restrict the results to. If not specified, all agents will be allowed.
BooleanisConnectedIf True, only returns agents that are currently connected. If False, only agents that are considered down will be returned, and if not specified, all agents will be returned.


Dataset - A dataset with columns AgentName, NodeRole, AgentGroup, LastCommunication, IsConnected, IsRunning, RunningState, RunningStateInt, LicenseKey, and Version, where each row is a new agent.


Possible values for RunningState and RunningStateInt are: 0 = Disconnected, 1 = Running, 2 = Warned, 3 = Errored



Code Examples

Example #1
# This script will loop through each row of the dataset and grab out every value from that row and assign it to a matching variable. Those variables can then be used in some way.
for row in range(results.rowCount):
agentName=results.getValueAt(row, "AgentName")
nodeRole=results.getValueAt(row, "NodeRole")
agentGroup=results.getValueAt(row, "AgentGroup")
lastComm=results.getValueAt(row, "LastCommunication")
isConnected=results.getValueAt(row, "IsConnected")
isRunning=results.getValueAt(row, "IsRunning")
runningState=results.getValueAt(row, "RunningState")
runningStateInt=results.getValueAt(row, "RunningStateInt")
licenseKey=results.getValueAt(row, "LicenseKey")
platformVersion=results.getValueAt(row, "Version")
# Can include some code here to use the variables in some way for each row like printing each variable to the console.
Example #2
# This script will grab status information from agents called Agent1, Agent2, Agent3, and will then place the data into a table on the same window.
results=system.eam.queryAgentStatus(agentIds=["Agent1", "Agent2", "Agent3"])
event.source.parent.getComponent('Table').data = results