Skip to main content

Amazon SNS

Pack Assets​


The Centreon Monitoring Connector Amazon SNS brings a host template:

  • Cloud-Aws-Sns-custom

It brings the following service templates:

Service AliasService TemplateService DescriptionDefault
Sns-Topic-NotificationsCloud-Aws-Sns-Topic-Notifications-ApiCheck Amazon SNS notifications per topicX

Discovery rules​

The pack provides a discovery rule to automatically discover SNS resources:


More information about the Host Discovery module is available in the Centreon documentation: Host Discovery

Collected metrics & status​

More information about collected metrics is available in the official Amazon documentation:

Metric nameDescription
sns.notifications.published.countThe number of messages published to your Amazon SNS topics.
sns.notifications.delivered.countThe number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.
sns.notifications.failed.countThe number of messages that Amazon SNS failed to deliver.
sns.notifications.filtered.countThe number of messages that were rejected by subscription filter policies.


AWS Configuration​

Configure a service account (access/secret keys combo) for which the following privileges have to be granted:

AWS PrivilegeDescription
sns:ListTopicsReturns a list of the requester's topics.
cloudwatch:listMetricsList all metrics from Cloudwatch AWS/VPN namespace
cloudwatch:getMetricStatisticsGet metrics values from Cloudwatch AWS/VPN namespace

Plugin dependencies​

To interact with Amazon APIs, you can use either use the awscli binary provided by Amazon or paws, a Perl AWS SDK (recommended). You must install it on every poller expected to monitor AWS resources.

For now, it is not possible to use paws if you are using a proxy to reach AWS Cloudwatch APIs.

yum install perl-Paws

For now, it is not possible to use paws in the following situations:

  • if you are using a proxy to reach AWS Cloudwatch APIs.
  • to automatically add Hosts in Centreon using the Host Discovery feature


  1. Install the package on every Centreon poller expected to monitor SNS resources:
yum install centreon-plugin-Cloud-Aws-Sns-Api
  1. On the Centreon web interface, on page Configuration > Monitoring Connector Manager, install the Amazon SNS Centreon Monitoring Connector.


  • Log into Centreon and add a new host through Configuration > Hosts.
  • In the IP Address/DNS field, set the following IP address:
  • Aplly the Cloud-Aws-Sns-custom template to the host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
XAWSSECRETKEYAWS Secret key of your IAM role. Password checkbox must be checked
XAWSACESSKEYAWS Access key of your IAM role. Password checkbox must be checked
XAWSREGIONRegion where the instance is running
XAWSCUSTOMMODECustom mode to get metrics, 'awscli' is the default, you can also use 'paws' perl library
PROXYURLConfigure proxy URL
TOPICNAMETopic name (Default : '.*')
EXTRAOPTIONSAny extra option you may want to add to every command line (eg. a --verbose flag)
DUMMYSTATUSHost state. Default is OK, do not modify it unless you know what you are doing
DUMMYOUTPUTHost check output. Default is 'This is a dummy check'. Customize it with your own if needed

How to check in the CLI that the configuration is OK and what are the main options for?​

Once the plugin is installed, log into your Centreon poller's CLI using the centreon-engine user account (su - centreon-engine) and test the plugin by running the following command (Some of the parameters such as --proxyurl have to be adjusted):

/usr/lib/centreon/plugins/ \
--plugin=cloud::aws::sns::plugin \
--mode=notifications \
--custommode=awscli \
--aws-secret-key='*******************' \
--aws-access-key='**********' \
--region='eu-west-1' \
--statistic=sum \
--timeframe='600' \
--period='60' \
--topic-name='my_sns_topic_1' \
--filter-metric='NumberOfNotificationsFailed' \
--warning-notifications-failed=0 \
--critical-notifications-failed=5 \

Expected command output is shown below:

OK: 'my_sns_topic_1' Statistic 'Sum' number of notifications failed: 0 | 'my_sns_topic_1~sum#sns.notifications.failed.count'=0;;;;
Notifications for topic 'my_sns_topic_1' :
Statistic 'Sum' number of notifications failed: 0

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins// \
--plugin=cloud::aws::sns::plugin \
--mode=notifications \

All available modes can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins// \
--plugin=cloud::aws::sns::plugin \


Please find the troubleshooting documentation for Centreon Plugins typical issues.