Imaging Request Agent is stalled with messages in progress
Description
This alert is triggered when the Imaging Request Agent has messages in progress but has not started or finished handling any message for more than 90 minutes, which means that the agent may be stalled.
Resolution Guidance
Impact When Active
- Imaging jobs that depend on the Imaging Request Agent may stop progressing. The agent is busy with messages that are stuck and does not start or finish any message, so new imaging jobs may wait behind them.
How To Resolve
- Check that the services that the Imaging Request Agent depends on are available: SQL Server, Service Bus, and Invariant. Fix any that is not available first. If the cause is not fixed, the messages that are delivered again after a restart get stuck again.
- If an Imaging Request Agent is still not making progress, disable the agent and then enable it again. The messages that were in progress may be delivered again.
- Restarting the agent does not clear the alert by itself. The alert clears when none of the reports of the last 10 minutes shows the problem any more. After the agent is restarted, or after it starts or finishes a message, the earlier reports leave this window within 10 minutes, and the alert clears at one of the next checks (the alert is checked every 5 minutes).
You can also try..
- To find the cause, log into Relativity and go to the Agents tab. Check the Imaging Request Agents: confirm that they are enabled and look for errors. Go to the Errors tab and look for recent Imaging errors from around the time when the agent stopped making progress.
- Open the Imaging Overview dashboard in Kibana and compare Jobs Submitted, Jobs Picked Up by Request Agent, and Jobs Completed. Imaging jobs that are submitted but are not picked up or completed point to an agent that is not making progress. The Imaging Queue & Latency dashboard shows whether the Imaging Request Agents are available.
- If the alert comes back after the agent was restarted, review the warnings and errors of the Imaging Request Agent from around the time when the agent stopped making progress. The [Relativity] Imaging Logs saved search in Kibana Discover shows the warning and error logs of the imaging agents.
Alert Details
The Imaging Request Agent regularly reports how many messages it is handling and when a message last started or finished. The alert is active when a report from the last 10 minutes shows that the agent is handling at least one message and that no message started or finished in the 90 minutes before the report.
The alert looks only at the reports of the last 10 minutes, and it is checked every 5 minutes. The 10 minutes is a short look-back window, not a wait time: it is long enough to contain at least one report of the agent, which reports regularly. The alert looks at the agent as a whole, not at individual messages. It does not detect one message that hangs while other messages keep starting and finishing on the same agent, and it does not become active for an agent that has no messages in progress. The Imaging Response Agent is not monitored by this alert; see the alert "Imaging Response Agent health check is failing".
Alert Condition Details
| Name | Value | Description |
|---|---|---|
| Rule Type | Elastic Query | Elasticsearch query with a script, because the rule compares two fields of the same report |
| Data View | metrics-* | |
| Filter Query | relsvr.imaging.thread_counter : * AND labels.HandlerName : "Imaging Request Handler" AND numeric_labels.ConcurrentThreadInUse > 0 AND numeric_labels.LastMessageReceivedDateTime > 0
|
|
| Script | @timestamp - numeric_labels.LastMessageReceivedDateTime > 5400000
|
The report is more than 5,400,000 milliseconds (90 minutes) after the last message start or finish |
| Group | Count | Number of matching reports |
| Threshold | > 0 | |
| Time Window | 10 minutes | |
| Frequency | 5 minutes |
Alert Metric Details
Metric Name: relsvr.imaging.thread_counter
Metric Description: Reports how many messages the Imaging Request Agent is handling and when a message last started or finished. It is reported regularly, whether or not messages are being handled. The alert reads the reports of the Imaging Request Handler only.
Metric Attributes:
| Attribute Name | Description |
|---|---|
| labels.HandlerName | The handler that reported the counter: Imaging Request Handler or Imaging Response Handler |
| labels.AgentID | The identifier of the agent that reported the counter |
| numeric_labels.ConcurrentThreadInUse | The number of messages that the agent is handling when it reports |
| numeric_labels.LastMessageReceivedDateTime | The last time a message started or finished, in Unix milliseconds (UTC) |
| host.name | The host that runs the agent |