Monitoring Amazon Simple Notification Service (SNS)
Monitor your Amazon SNS service with Instana for end-to-end visibility and real-time insights into your service performance.
For more information, see Amazon SNS.
To monitor Amazon SNS, install the Instana agent in your environment. The agent automatically installs and enables the Amazon SNS sensor, collecting Amazon SNS related metrics. You can view these metrics in the Instana UI.
For more information about the other supported AWS services, see the AWS documentation.
Adding required IAM permissions
Add the following IAM role permissions to the host that is running the Instana agent so that the Instana agent discovers and monitors your AWS SNS instances:
-
cloudwatch:GetMetricStatistics -
cloudwatch:GetMetricData -
sns:ListTopics -
sns:ListTagsForResource -
sns:GetTopicAttributes
Configuring the Amazon SNS sensor
After the Instana agent is installed, the Amazon SNS sensor is enabled by default.
Disabling the Amazon SNS sensor
To disable monitoring of Amazon SNS instances, use the following configuration:
com.instana.plugin.aws.sns:
enabled: false
Setting the metric collection interval
By default, metrics for SNS are pulled every 5 minutes. To
change this frequency, edit the cloudwatch_period
value in the agent configuration file
<agent_install_dir>/etc/instana/configuration.yml
as shown in the following example:
com.instana.plugin.aws.sns:
cloudwatch_period: 300
Setting proxy configurations
To configure the Amazon SNS sensor to use proxy configuration, add the following agent configuration settings:
com.instana.plugin.aws.sns:
proxy_host: 'example.com' # proxy host name or ip address
proxy_port: 3128 # proxy port
proxy_protocol: 'HTTP' # proxy protocol: HTTP or HTTPS
proxy_username: 'username' # OPTIONAL: proxy username
proxy_password: 'password' # OPTIONAL: proxy password
Configuring monitoring of Amazon SNS across multiple AWS accounts
You can set up monitoring of multiple AWS accounts with one AWS agent in the same region. For more information, see Monitoring multiple AWS accounts.
To configure the Instana agent to monitor Amazon SNS across multiple AWS accounts, use any one of the following approaches:
AWS named profiles approach
To override the profiles that are used to monitor Amazon SNS, use the following configuration:
com.instana.plugin.aws.sns:
profile_names:
- 'profile2'
- 'profile3'
AWS Security Token Service (STS) approach
To override the IAM roles that are used to monitor Amazon SNS, use the following configuration:
com.instana.plugin.aws.sns:
role_arns:
- 'arn:aws:iam::<account_1_id>:role/<role_1_name>'
- 'arn:aws:iam::<account_2_id>:role/<role_2_name>'
Filtering Amazon SNS services by defining tags
Instana monitors all Amazon SNS services by default. However, if
you don't want to monitor all services, define which tags you want
to include or exclude from discovery in the agent
configuration.yaml file. If you define a tag or
resource group in both lists (include and exclude), the exclude
list takes precedence.
To define multiple tags, separate them with commas. Define tags as a key-value pair that is separated by a colon (:). You needn't define all values to enable filtering.
To include services by tags in discovery, update the
configuration.yaml file as shown in the following
example:
com.instana.plugin.aws.sns:
include_tags: # Comma separated list of tags in key:value format (e.g. env:prod,env:staging)
To exclude services by tags from discovery, update the
configuration.yaml file as shown in the following
example:
com.instana.plugin.aws.sns:
exclude_tags: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
Amazon SNS services without tags are monitored by default but
can be excluded by setting the include_untagged field
to false as shown in the following example:
com.instana.plugin.aws.sns:
include_untagged: false # True value by default
Setting poll rate
You can specify how often sensors poll the AWS tagged resources
by using the tagged-services-poll-rate configuration
property. By default, 300 seconds.
To define how often sensors poll the tagged resources, update
the configuration.yaml file as shown in the following
example:
com.instana.plugin.aws:
tagged-services-poll-rate: 60 #default 300
Viewing metrics
To view the metrics, complete the following steps:
- From the navigation menu in the Instana UI, click Infrastructure.
- Click a specified host.
You can see a host dashboard with all the collected metrics and monitored processes. Metrics are pulled every 5 minutes.
Tracked configuration
The following table outlines the configuration data that the sensor collects from Amazon SNS instances:
| SNS Topic Details | Description |
|---|---|
| ARN | The unqualified Amazon Resource Name (ARN) assigned to the topic. |
| Availability Zone | The location of the instance. |
| Topic Name | The topic name. |
| Display Name | The user-defined topic name. |
| Subscriptions Confirmed | The number of subscriptions that are confirmed. |
| Number Of Retries | The number of notification retry limits. |
| Minimum Delay Target | The minimum delay to the target subscription. |
| Maximum Delay Target | The maximum delay to the target subscription. |
Metrics
The following table outlines the metrics that the sensor collects from Amazon SNS instances:
| Topic metrics | Description |
|---|---|
| NumberOfMessagesPublished | The number of messages that are published to your Amazon SNS topics. |
| NumberOfNotificationsFailedToRedriveToDlq | The number of messages that are not moved to a dead-letter queue. |
| NumberOfNotificationsDelivered | The number of messages that are successfully delivered from your Amazon SNS topics to subscribing endpoints. |
| PublishSize | The size of messages published. |
| NumberOfNotificationsRedrivenToDlq | The number of messages that are moved to a dead-letter queue. |
| NumberOfNotificationsFailed | The number of messages that Amazon SNS failed to deliver. |
| NumberOfNotificationsFilteredOut | The number of messages that are rejected by subscription filter policies. A filter policy rejects a message when the message attributes don't match the policy attributes. |