Available CloudWatch metrics for Amazon SQS
Amazon SQS sends the following metrics to CloudWatch.
For standard queues, the result is approximate because of the distributed architecture of Amazon SQS. In most cases, the count should be close to the actual number of messages in the queue.
For FIFO queues, the result is exact.
Amazon SQS metrics
The AWS/SQS
namespace includes the following metrics.
Metric | Description |
---|---|
ApproximateAgeOfOldestMessage |
The approximate age of the oldest non-deleted message in
the queue.
Reporting Criteria: A non-negative value is reported if the queue is active. Units: Seconds Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesDelayed |
The number of messages in the queue that are delayed and
not available for reading immediately. This can happen when
the queue is configured as a delay queue or when a message
has been sent with a delay parameter.
Reporting Criteria: A non-negative value is reported if the queue is active. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesNotVisible |
The number of messages that are in flight. Messages are
considered to be in flight if they have
been sent to a client but have not yet been deleted or have
not yet reached the end of their visibility
window. Reporting Criteria: A non-negative value is reported if the queue is active. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesVisible |
The number of messages available for retrieval from the
queue. Reporting Criteria: A non-negative value is reported if the queue is active. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) |
NumberOfEmptyReceives ¹ |
The number of ReceiveMessage API calls that
did not return a
message.Reporting Criteria: A non-negative value is reported if the queue is active. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) |
NumberOfMessagesDeleted ¹ |
The number of messages deleted from the
queue. Reporting Criteria: A non-negative value is reported if the queue is active. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) Amazon SQS emits theNumberOfMessagesDeleted metric for
every successful deletion operation that uses a valid receipt handle, including duplicate deletions.
The following scenarios might cause the value of the
NumberOfMessagesDeleted metric to be higher
than expected:
|
NumberOfMessagesReceived ¹ |
The number of messages returned by calls to the
ReceiveMessage
action.Reporting Criteria: A non-negative value is reported if the queue is active. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) |
|
The number of messages added to a
queue. Reporting Criteria: A non-negative value is reported if the queue is active. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) |
|
The size of messages added to a queue. Reporting Criteria: A non-negative value is reported if the queue is active. Units: Bytes Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console)
|
¹ These metrics are calculated from a service perspective, and can include retries. Don't rely on the absolute values of these metrics, or use them to estimate current queue status.
Dimensions for Amazon SQS metrics
The only dimension that Amazon SQS sends to CloudWatch is QueueName
.
This means that all available statistics are filtered by
QueueName
.