Saturday, September 3, 2016

[Zabbix] How to use Amazon SNS free (US only) SMS notification for Zabbix Monitoring

Amazon provides a notification service which also can send SMS. For US phone numbers the first 100 a month a free and this a nice thing to use for Zabbix monitoring.

To do that we'll need the following steps:

1. install aws-cli (http://docs.aws.amazon.com/cli/latest/userguide/installing.html)
2. create a Access Key ID and Secret Access Key
3. under SNS service create a new topic
4. create new subscription to that topic for each phone number you want to add
5. Protocol: SMS, Endpoint: your phone number
6. copy the Topic ARN
7. on a Debian system create /var/lib/zabbix and chown it for zabbix:zabbix
8. run: su -c 'aws configure' -s /bin/sh zabbix , and enter the both keys, then a region e.g. us-east-1 and the last leave empty. see http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
9. configure your action, under Operations of your Action, select Operation Type : Remote Command, select Execute on : Zabbix Server and enter following Command: aws sns publish --topic-arn arn:aws:sns:us-east-1:3062343543543:example --message "URGENT: INFRASTRUCTURE ISSUE"

1 comment:

  1. Nice blog provided by you, it's really useful to the users. For more information on AWS join AWS Online Course

    ReplyDelete