Open khoi-thinh opened 7 years ago
I have modified the script to work with ALB. See here https://github.com/sc-pulsion/zabbix_aws_template/blob/add-alb/scripts/cloudwatch_zabbix.py
You will need to clone the ELB template and change any 'elb' to 'alb'. Then when adding the host, the instance ID macro needs to be the same as shown in the Cloudwatch logs e.g. app/insertloadbalancername/08add7cacfdce113
Its dirty but works. I'll add templates when I get the chance.
@miyo-kzz are you still watching this? It would be nice to get this working fully.
Or even @tech-sketch-admin
@sc-pulsion My best advice would be that you switch to : https://github.com/omni-lchen/zabbix-cloudwatch
Hi, @sc-pulsion I did what you said but It not works in my case. I updated my cloudwatch_zabbix.py script, after that, I modified my template cloudwatch_template.xml adding a cloned part from elb. Nex step has been to create a new ALB host. I can put as a name host my ALB name (app/xxxxx/xxxxxxx), then I suppose that I have to create a new MACRO with my ALB name, But..¿What kind of macro? I have created a {$HOST.HOST} macro but It seems not to perform well. When I go to see Monitoring/recent datawhat I see is this: {"response":"success","info":"processed: 0; failed: 0; total: 0; seconds spent: 0.000008"}
@khoi-thinh , @Atem18 Do you have any extra idea?
I am using Zabbix 4.0 Thanks in advance
Its been over a year since I made this change, and it was for a client who I no longer support, however I'll try my best to help.
Do you have this working for a current ELB? If you can get it working for an ELB using this original code then I can help troubleshoot using my fork.
Hi @sc-pulsion , First of all, I want to thank you for your willingness. Said this, I going to explain to you my steps. I tried to monitor my AWS resources following too many GitHub procedures without success. All of them are created for Zabbix 3 and I am using 4.0 version. Then, I am a bit frustrated.
I started following tech-sketch instructions (https://github.com/tech-sketch/zabbix_aws_template/wiki/Amazon-CloudWatch-Metrics-monitoring-Template) but I only know how to monitor EC2 instances. In this procedure he said: "Register hosts: 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 "
Then in "issues", I saw your comment:
"You will need to clone the ELB template and change any 'elb' to 'alb'. Then when adding the host, the instance ID macro needs to be the same as shown in the Cloudwatch logs e.g. app/insertloadbalancername/08add7cacfdce113_ Its dirty but works. I'll add templates when I get the chance."
Then what I did was: -Change tech-sketch's cloudwatch_zabbix.py for yours -Modify tech-sketch's cloudwatch template cloning ELB part and changing all elb for alb. -But I do not understand you when you explain how I have to add an ALB host. You talk about "instance ID macro" but in the other example (EC2) the ID is not a macro is the host name. ¿Can you explain to me how to manage this field in ALB?
Thanks for your help. Do you know another tool for monitoring AWS resources in an easier way?
So i tried this tool and it worked perfectly with ELB. I also want it work with ALB, how can i do that? Do i have to change anything in cloudwatch_zabbix.py?