Configuring Agent Logging and Statistics

You can log agent activity and statistics to the database. Complex workflow agents, along with their custom SQL queries, can affect overall performance. To identify bottlenecks in agent execution, four tables can be configured to collect agent and agent action information.

  • AGENT_LOG: A log of agent execution where a record represents the start, completion, error or custom log instruction of each execution.
  • AGENT_ACTION_LOG: A log of each agent action execution where a record represents the start, completion or error from an agent action.
  • AGENT_STATS: Cumulative statistics for each agent. This includes average and maximum time for agent completion.
  • AGENT_ACTION_STATS: Cumulative statistics for each agent action. This includes average and maximum values for queue time, execution time and completion time.

Note that the LOG tables have no foreign keys. This optimizes performance and allows the log to maintain information for agents that have been modified or deleted. These tables are partitioned for weekly truncation. Up to three weeks of agent data are stored in the logs.

The STATS tables are foreign keyed into each agent or agent action. Any time an agent is modified, the corresponding statistics records are reset.

Agent Logging and Statistics

Enabling Agent Performance Tracking

Agent logging and statistics can be controlled globally or per-agent. The following properties control default behavior for all agents:

  • glog.agent.defaultLogLevel = [NONE | AGENT | ACTIONS] where NONE logs no agent activity; AGENT logs the start, completion and errors coming out of agent execution; and ACTIONS logs the start and completion of every action.
  • glog.agent.defaultStatsLevel = [NONE | AGENT | ACTIONS] where NONE collects no agent statistics; AGENT collects summary statistics on agent execution; and ACTIONS collects summary statistics on every agent action execution.

On the Agent Header, you can override the default by changing the Log Level and Statistics Level fields.

Adding Custom Log Records

Information specific to an agent can be added to the agent log via the LOG agent action. This action allows a message to be written to the System Log, the Agent Log, or both. By using the ASSIGN VARIABLE action in conjunction with the LOG action, customers can add the result of ad-hoc queries to agent logs.

Viewing Agent Logs and Statistics

Agent and Agent Action log records can be accessed from the system via any Process Management menu. The Agent link brings up a finder for AGENT_LOG records; the Agent Actions link brings up a finder for AGENT_ACTION_LOG records.

Agent and Agent Action statistics can be accessed from the Agent viewer or manager. On the agent header, overall agent statistics are available for execution of the agent. On the actions pages, each action shows overall agent action statistics. Statistics may be reset for a given agent by running agent’s Reset Statistics action.

Performance Considerations when Collecting Agent Logs and Statistics

All updates to the AGENT_LOG and AGENT_ACTION_LOG table are done independently of other transactions in the system. They use the DEDICATED_DBA connection pool to ensure log activity is not lost. This may put a heavier demand on the connections in the pool. For high-volume agents, this pool could become a bottleneck. The pool wait times and reservation failures should be monitored to determine if the pool size needs to be increased.

Related Topics