SNS notifications

This Zabbix installation is now ready to ship using AWS SNS . This configuration allows us to avoid problems related to sending mail in AWS, and have an advanced and secure notification delivery system.

Configure SNS alerts sending

Up to 5 different SNS issues can be configured (to distinguish according to the importance of the shipment), which are:

  • Not classified
  • Information
  • Warning
  • Average
  • High
  • Disaster

For Zabbix sending notifications you need to create up to 5 SNS topics, and one IAM user who can connect to and send messages.

Create SNS topics and IAM user to send messages to

This step is easiest to do with our SNS Topic and IAM User Cloudformation stack that is already prepared to create SNS and IAM users.

After deploy the stack, you will find on Outputs tab four values that you need to note:

  • SNSAverage: SNS Topic for Average type problems
  • SNSDisaster: SNS Topic for Disaster type problems
  • SNSHigh: SNS Topic for High type problems
  • SNSInformation: SNS Topic for Information type problems
  • SNSNotClassified: SNS Topic for Not Classified type problems
  • SNSWarning: SNS Topic for Warning type problems
  • ZabbixSendingUserAccessKeyId and ZabbixSendingUserSecretAccessKey: User and password for IAM user

NOTE: One or more of this outputs may could not appear depending of the config you create when deploy cloudformation stack.

Configure /etc/zabbix/zabbix_ami.yml

Inside file /etc/zabbix/zabbix_ami.yml you will find a specific section for configure SNS options. Relevant code are show here:

sns:
  aws:
    access_key_id:
    secret_access_key:
    region:
  topics:
    not_classified: arn:aws:sns:eu-west-1:000000000000:sample-sns
    information: arn:aws:sns:eu-west-1:000000000000:sample-sns
    warning: arn:aws:sns:eu-west-1:000000000000:sample-sns
    average: arn:aws:sns:eu-west-1:000000000000:sample-sns # Average
    high: arn:aws:sns:eu-west-1:000000000000:sample-sns # High
    disaster: arn:aws:sns:eu-west-1:000000000000:sample-sns # Disaster

You need to configure the desired SNS topics (you can reuse the same topic several times if you prefer) and user/password and region values. Thats all!

Configure Zabbix user

Last step is configure Zabbix to send notifications througt SNS. To do this you need to:

  1. Login on zabbix interface with user data
  2. Go to User settings => Profile
  3. Click on Media tab
  4. Add a new media of type “AWS SNS”, Enabled, and configure the other fields as you like (field Send to is currently not used, you can put any on them)
  5. Click on Add button to add new media, and then click on Update to save the changes

Thats all !