-
Notifications
You must be signed in to change notification settings - Fork 29
Amazon CloudWatch Metrics monitoring Template
This is Amazon CloudWatch metrics monitoring templates.
Operation has been confirmed under the following environments.
- CentOS7.2 or Amazon Linux 2016.3
- Python 2.7
- boto3(AWS SDK for Python)
- Zabbix 2.2 or 3.0
Only 3 steps.
- Download and set a python script
- Import template
- Register hosts
Please download scripts/cloudwatch_zabbix.py on your Zabbix Server (External Scripts directory). And please set exec permission to Zabbix Server user(default: zabbix).
Please import templates/3.0/cloudwatch_template.xml at Zabbix WebGUI ([Configuration]->[Templates]->Import). (In case of Zabbix 2.2: templates/2.2/cloudwatch_template.xml)
If you want to monitor the billing data, please import awsbilling_template.xml.
Please register Zabbix hosts for EC2 instances, RDS instances, ELB, EBS volume or others.
In case of an EC2 instance:
- Host name: i-xxxxx (please set Instance ID)
- Templates: Template AWS EC2
- Macros:
- {$REGION} : set AWS region name(e.g. ap-northeast-1)
- {$KEY} : set AWS Access Key ID (e.g. AKI........)
- {$SECRET} : set AWS Secret Access Key
In case of Billing data:
- Host name: any
- Templates: Template AWS Billing
- Macros:
- {$REGION} : set AWS region name to us-east-1
- {$KEY} : set AWS Access Key ID
- {$SECRET} : set AWS Secret Access Key
If you don't want to set AWS credentials info at Zabbix Macro, please set OS environment variables.
- AWS_DEFAULT_REGION
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
And, please change external check items key.
before:
cloudwatch_zabbix.py[ec2,"-r",{$REGION},"-a",{$KEY},"-s",{$SECRET},"-i",{HOST.HOST},"-m","True"]
after:
cloudwatch_zabbix.py[ec2,"-i",{HOST.HOST},"-m","True"]