AWS Simple Queue Service¶
The displayed Metrics for AWS Simple Queue Service (SQS) include the approximate age of the oldest undeleted message in the queue, the number of delayed messages that cannot be read immediately, the number of messages in flight, the number of messages available for retrieval from the queue, etc.
Configuration¶
Install Func¶
It is recommended to activate the TrueWatch integration - extensions - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation.
For self-deploying Func, refer to Self-deploying Func
Install Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can grant global read-only permissions
ReadOnlyAccess
)
Automata Version Activation Script¶
- Log in to the TrueWatch console
- Click the 【Integration】 menu, select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step.
- Click 【Test】, after a successful test, click 【Save】. If the test fails, please check the relevant configuration information and retest.
- Click 【Cloud Account Management】, you can see the added cloud account in the list, click the corresponding cloud account to enter the details page.
- Click the 【Integration】 button on the cloud account details page, find
AWS Simple Queue Service
under theNot Installed
list, and click the 【Install】 button to pop up the installation interface for installation.
Manual Activation Script¶
-
Log in to the Func console, click 【Script Market】, enter the TrueWatch script market, and search for
integration_aws_sqs
-
After clicking 【Install】, enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create the
Startup
script set and automatically configure the corresponding startup script. -
After activation, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to execute it immediately without waiting for the scheduled time. After a while, you can view the execution task records and corresponding logs.
Verification¶
- In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration, and you can also check the corresponding task records and logs to check for any anomalies.
- In TrueWatch, check whether asset information exists in 「Infrastructure / Custom」.
- In TrueWatch, check whether there is corresponding monitoring data in 「Metrics」.
Metrics¶
After configuring Amazon CloudWatch, the default Measurement is as follows. More Metrics can be collected through configuration:
Amazon CloudWatch AWS Simple Queue Service Metrics Details
Metric Name | Description | Unit | Valid Statistics |
---|---|---|---|
ApproximateAgeOfOldestMessage |
The approximate age of the oldest undeleted message in the queue. Note: When a message is received three times (or more) and not processed, it will be moved to the back of the queue, and the ApproximateAgeOfOldestMessage metric will indicate the age of the second oldest message that has not been received more than three times. This operation 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 age of the poison pill message will not be included in the metric until the poison pill message is successfully used. If the queue has a redrive policy, when the configured maximum number of receives is reached, the message will be moved to the dead-letter queue. When a message is moved to the dead-letter queue, the ApproximateAgeOfOldestMessage metric of the dead-letter queue indicates the time the message was moved to the dead-letter queue (not the original time the message was sent). Reporting Standard: If the queue is active, a non-negative value is reported. | Seconds | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesDelayed |
The number of messages in the queue that are delayed and cannot be read immediately. This occurs if the queue is configured as a delay queue or if the delay parameter is used to send messages. Reporting Standard: If the queue is active, a non-negative value is reported. | Count | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesNotVisible |
The number of messages in flight. If a message has been sent to a client but has not been deleted or has not reached the end of its visibility window, it is considered in flight. Reporting Standard: If the queue is active, a non-negative value is reported. | Count | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
ApproximateNumberOfMessagesVisible |
The number of messages available for retrieval from the queue. Reporting Standard: If the queue is active, a non-negative value is reported. | Count | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
NumberOfEmptyReceives |
The number of ReceiveMessage API calls that did not return any messages. Reporting Standard: If the queue is active, a non-negative value is reported. | Count | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
NumberOfMessagesDeleted |
The number of messages deleted from the queue. Reporting Standard: If the queue is active, a non-negative value is reported. | Count | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
NumberOfMessagesReceived |
The number of messages returned by the ReceiveMessage operation. Reporting Standard: If the queue is active, a non-negative value is reported. | Count | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
NumberOfMessagesSent |
The number of messages added to the queue. Reporting Standard: If the queue is active, a non-negative value is reported. | Count | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |
SentMessageSize |
The size of messages added to the queue. Reporting Standard: If the queue is active, a non-negative value is reported. | Bytes | Average, Minimum, Maximum, Sum, Sample Count (displayed as Sample Count in the Amazon SQS console) |