AWS Simple Queue Service¶
The displayed Metrics for AWS Simple Queue Service include the approximate Exist time of the oldest message in the queue that has not been deleted, the number of delayed messages that cannot be read immediately, the number of messages in flight state, the number of messages that can be retrieved from the queue, etc.
Configuration¶
Install Func¶
It is recommended to enable Guance integration - extension - DataFlux Func (Automata): all prerequisites are automatically installed. Please continue with the script installation.
If you deploy Func yourself, refer to Self-deployed Func
Installation Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant global read-only permission
ReadOnlyAccess
)
Script for Enabling Managed Version¶
- Log in to the Guance console
- Click on the 【Integration】 menu and select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface; if cloud account information has been configured before, skip this step
- Click 【Test】, after a successful test click 【Save】; if the test fails, check whether the relevant configuration information is correct and retest
- In the 【Cloud Account Management】 list, you can see the added cloud accounts, click on the corresponding cloud account to enter the details page
- Click the 【Integration】 button on the cloud account details page. Under the
Not Installed
list, findAWS Simple Queue Service
, click the 【Install】 button, and install it via the installation interface.
Manual Enablement Script¶
-
Log in to the Func console, click 【Script Market】, go to the official script market, and search for
guance_aws_sqs
-
After clicking 【Install】, input the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create a
Startup
script set and automatically configure the corresponding startup scripts. -
After enabling, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click 【Execute】 to run it immediately without waiting for the scheduled time. After a short wait, you can view the execution task records and corresponding logs.
We default collect some configurations, for more details see the Metrics section.
Verification¶
- In 「Management / Automatic Trigger Configuration」 confirm whether the corresponding tasks have corresponding automatic trigger configurations, and at the same time, you can check the corresponding task records and logs for any abnormalities.
- In Guance, 「Infrastructure / Custom」 check if there is asset information.
- In Guance, 「Metrics」 check if there is corresponding monitoring data.
Metrics¶
After configuring Amazon-CloudWatch, the default Measurement set is as follows. You can collect more Metrics through configuration:
Amazon CloudWatch AWS Simple Queue Service Metrics Details
Metric Name | Description | Unit | Valid Statistics |
---|---|---|---|
ApproximateAgeOfOldestMessage |
The approximate Exist time of the oldest message in the queue that has not been deleted. Note: When a message is received three times (or more) and not processed, the message will move to the back of the queue, and the ApproximateAgeOfOldestMessage metric will indicate the second oldest message that has not been received more than three times. This occurs even if the queue has a redrive policy. Since a single poison pill message (received multiple times but never deleted) can distort this metric, the expiration of the poison pill message will not be included in the metric until it is successfully used. If the queue has a redrive policy, when the maximum number of receives is reached, the message will move to the dead-letter queue. When the message moves to the dead-letter queue, the ApproximateAgeOfOldestMessage metric of the dead-letter queue indicates the time the message moved to the dead-letter queue (not the original time the message was sent). Reporting standard: Reports non-negative values if the queue is active. | Seconds | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesDelayed |
The number of delayed messages in the queue that cannot be read immediately. This happens if the queue is configured as a delay queue or if the delay parameter is used to send messages. Reporting standard: Reports non-negative values if the queue is active. | Count | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesNotVisible |
The number of messages in flight state. If a message has been sent to the client but has not been deleted or has not yet reached the end of its visibility window, the message is considered to be in flight. Reporting standard: Reports non-negative values if the queue is active. | Count | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesVisible |
The number of messages that can be retrieved from the queue. Reporting standard: Reports non-negative values if the queue is active. | Count | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
NumberOfEmptyReceives |
The number of ReceiveMessage API calls that did not return a message. Reporting standard: Reports non-negative values if the queue is active. | Count | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
NumberOfMessagesDeleted |
The number of messages deleted from the queue. Reporting standard: Reports non-negative values if the queue is active. | Count | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
NumberOfMessagesReceived |
The number of messages returned by calling the ReceiveMessage operation. Reporting standard: Reports non-negative values if the queue is active. | Count | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
NumberOfMessagesSent |
The number of messages added to the queue. Reporting standard: Reports non-negative values if the queue is active. | Count | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |
SentMessageSize |
The size of messages added to the queue. Reporting standard: Reports non-negative values if the queue is active. | Bytes | Average, Minimum, Maximum, Sum, Data Samples (displayed as Sample Count in the Amazon SQS console) |