About WorkZone agents
All WorkZone agent jobs are defined in the SERVICE_QUEUE table in the database.
The SERVICE_QUEUE table contains all WorkZone agent jobs currently queued for execution as well as any failed or paused jobs. Successfully executed FIX and OCR jobs are removed from the SERVICE QUEUE table but successfully executed SUB jobs are not removed.
You can gain an overview of the status of the agents by querying the SERVICE_QUEUE table and analyzing the results.
WorkZone QueryBuilder
All WorkZone agent jobs that have failed during their execution will trigger an alert in the server event log on the server that the job is executed on. You can use the event log to identify which job has failed because the event log contains a reference to the KEY field in the SERVICE_QUEUE table.
The SERVICE_QUEUE table
| Field | Description |
|---|---|
|
AGENTTYPE |
The WorkZone agent of the job. |
|
STATUS |
Displays the status of the agent job. Empty: The agent job is running with no errors. 1: The agent job is waiting to be run. 2: The agent job has failed in some degree. 3 or more: The agent job status has been paused and will not be run until the status is changed to 1 or the field is empty. This status can only be set manually and can therefore be used to pause an agent job, which allows you to remove it from the queue without deleting it. |
|
KEY |
The unique identifier of the agent job. |
Monitoring the SERVICE_QUEUE table
The SERVICE_QUEUE table can be difficult to monitor as the size of the table cannot always be used as an indicator. Sometimes the SERVICE_QUEUE table may appear large because there are more service jobs scheduled. When the jobs have been executed, the table size will shrink again as the successful jobs are removed from the table.
The SERVICE_QUEUE table can also sometimes appear to be stopped or react slowly to queries, but this can be due to large OCR or FIX jobs currently being executed. In other situations, a sluggish or stopped SERVICE_QUEUE table can actually be indicative that something is not functioning as it should.
To better monitor the SERVICE_QUEUE table, you can use specific scripts to display jobs with specific states (the STATUS field).
Query the SERVICE_QUEUE table by using WorkZone QueryBuilder
You can gain an overview of the different agent jobs by using the following SELECT statement in WorkZone QueryBuilder:
SELECT AGENT_TYPE, STATUS, COUNT(*) FROM SERVICE_QUEUE GROUP BY AGENT_TYPE, STATUS
There are three agent jobs for the SUB, FIX and OCR agents which correspond to the AgentSUB (WorkZone subscription), Agent FIX (WorkZone Free text search) and AgentOCR (OCR) agents.
Some of the jobs are at status 2, which means they have failed in some way. There is one SUB, FIX and OCR job each that have failed. Two SUB jobs are currently queued and waiting to be run. One has a status value of 1 and the other has an empty status value.