AWS Simple Notification Service
The displayed Metrics for AWS Simple Notification Service include the number of messages successfully transmitted from Amazon SNS topics to subscribed endpoints, the number of failed message transmissions by Amazon SNS, the number of messages published to your Amazon SNS topic, the size of published messages, etc.
Configuration¶
Install Func¶
It is recommended to enable Guance Integration - Extension - Managed Func: All prerequisites are automatically installed. Please continue with script installation.
If you deploy Func manually, refer to Self-deployed Func
Install Script¶
Note: Prepare an Amazon AK that meets the requirements 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 account. Click the corresponding cloud account and enter the details page.
- Click the [Integration] button on the cloud account details page. Under the
Not Installed
list, findAWS Simple Notification Service
, click the [Install] button, and follow the prompts to install it.
Script for Manual Enablement¶
-
Log in to the Func console, click [Script Market], enter the official script market, and search for
guance_aws_sns
. -
After clicking [Install], input the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click [Deploy Startup Script], and the system will automatically create a
Startup
script set and configure the corresponding startup script automatically. -
After enabling, you can see the corresponding automatic trigger configuration in "Management / Automatic Trigger Configuration". Click [Execute] to run immediately without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs.
We default to collecting some configurations; for more details, see the Metrics section.
Verification¶
- In "Management / Automatic Trigger Configuration", confirm whether the corresponding tasks have the corresponding automatic trigger configuration. You can also view the corresponding task records and logs to check for any abnormalities.
- In Guance, under "Infrastructure / Custom", check if there is any asset information.
- In Guance, under "Metrics", check if there are any corresponding monitoring data.
Metrics¶
After configuring Amazon-CloudWatch, the default Measurement set is as follows. More Metrics can be collected through configuration:
Amazon CloudWatch AWS Simple Notification Service Metrics Details
Metric Name | Description | Unit | Valid Statistics |
---|---|---|---|
NumberOfNotificationsDelivered |
The number of messages successfully transmitted from your Amazon SNS topics to subscribed endpoints. For successful transmission, the endpoint subscription must accept the message. Subscriptions can accept messages in two cases: a.) It lacks a filter policy or b.) Its filter policy contains attributes that match those assigned to the message. If a subscription rejects the message, the transmission attempt will not count towards this Metric. | Count | Sum, Average |
NumberOfNotificationsFailed |
The number of messages that failed transmission by Amazon SNS. For Amazon SQS, email, SMS, or mobile push endpoints, this Metric increments by 1 when Amazon SNS stops trying to deliver the message. For HTTP or HTTPS endpoints, this Metric includes each failed transmission attempt (including retries after the initial attempt). For all other endpoints, the count increases by 1 when message transmission fails (regardless of the number of attempts). This Metric does not include messages rejected by the subscription filter policy. You can control the number of retries for HTTP endpoints. For more information, see Amazon SNS Message Delivery Retries. | Count | Sum, Average |
NumberOfMessagesPublished |
The number of messages published to your Amazon SNS topic. | Count | Sum |
PublishSize |
The size of published messages. | Bytes | Minimum, Maximum, Average, and Count |