Zabbix AMI contains a number of special files that you should know about
/etc/zabbix/zabbix_ami.yml
this is the more important file, as it handles the config of specific topics like autoscaling checks or SNS notifications. An example of this file (with fake data):
zabbix:
api:
user: autoscaler_api_user
password: i-073672daf01037aea94
sns:
aws:
access_key_id: AKK4L6A3OXZZ5HE2POQRU7V
secret_access_key: cICycAg26hSDpsJwbhZjbaaYlt4Tz3n1xqE7Oxp6X2Hf
region: us-east-1
topics:
not_classified: arn:aws:sns:us-east-1:000000000:Zabbix-General-SNS # Not classified
information: arn:aws:sns:us-east-1:000000000:Zabbix-General-SNS # Information
warning: arn:aws:sns:us-east-1:000000000:Zabbix-General-SNS # Warning
average: arn:aws:sns:us-east-1:000000000:Zabbix-General-SNS # Average
high: arn:aws:sns:us-east-1:000000000:Zabbix-General-SNS # High
disaster: arn:aws:sns:us-east-1:000000000:Zabbix-General-SNS # Disaster
sqs:
delay_seconds: 60
default_region: us-east-1
queues:
- url: https://sqs.us-east-1.amazonaws.com/000000000/zabbix-pro-sqs-queue
access_key_id: AKIA3OXZZ5HEWUR5A16CNWH
secret_access_key: 8ttYO3Ba9K6p0C+aj3fH5cDt2eRLHmlkHbMtlrpv18S7KRbC
region: us-east-1
Currently, this file contains three different sections:
- zabbix: As we need to connect with Zabbix server to delete old hosts, we need to access throught the API. To do that, we generate a specific user and their login info was configured here.
- sns: This are the required config for sending alarmas throught SNS. This section contains the data for IAM user, and the SNS topics we need to use.
- sqs: This section contains config for control AWS autoscaling messages. We define here how much often we check the queue (delay_seconds) and the different queues to check.
/var/log/zabbix-sqs-reader/zabbix-sqs-reader.log
This file register the different events for autoscaling events readed throught SQS.
Before you configure it, you will see that a message like Ops! It looks like the file /etc/zabbix/zabbix_ami.yml hasn’t been configure yet. We better sleep for 5 minutes.. Thats normal and dissapear when you config your zabbix_ami.yml file.