Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you elaborate more on how to set this up? #13

Open
khoi-thinh opened this issue Jun 20, 2017 · 5 comments
Open

Can you elaborate more on how to set this up? #13

khoi-thinh opened this issue Jun 20, 2017 · 5 comments

Comments

@khoi-thinh
Copy link

khoi-thinh commented Jun 20, 2017

As far as i understand, you had prepared everything including template, script.
In my case, i just want to integrate ELB metrics into my zabbix server.
How should i do that? Please correct me if i'm wrong.

  1. Install boto
    2.Create folder /opt/zabbix/cloudwatch
    3.Add AWS credentials
    4.Because aws_services_metrics.conf has every metrics, so i don't think i need to add anything
    5.I don't know how to create template and item, so i would use ELB template you created. I would import it to zabbix
    6.Create new host an linked with ELB template.
    7.Execute that cron.ELB.sh
    Is that correct?
@omni-lchen
Copy link
Owner

That's correct, but you also need to install python dateutil module due to recent utc to local timezone change.

@khoi-thinh
Copy link
Author

khoi-thinh commented Jun 20, 2017

Do i have to change any value in cron.ELB.sh script or have to setup MACRO in zabbix host? I didn't see anywhere in your guide said that i need to put in aws region or anything.
And unfortunately, as i executed the cron.ELB.sh, it said:
./cron.ELB.sh: line 27: zabbixCloudWatch.py: command not found

@omni-lchen
Copy link
Owner

You only use MACRO if you use discovery rule, but also need to adjust the script a bit in awsLLD.py to adapt to your naming standard. You need to give execution permission to all bash and python scripts
chmod +x *.py
chmod +x *.sh

@khoi-thinh
Copy link
Author

khoi-thinh commented Jun 21, 2017

First of all, all of your scripts had been given execution permissions.
The same error came out
./cron.ELB.sh: line 27: zabbixCloudWatch.py: command not found

So let me be clear
I have 3 ELB running named A,B,C. I just want to get metrics from B and my instance is in Singapore region (ap-southeast-1) Where is the place i should put that information in?

In your cron.ELB.sh, there are these line

Load Balancer Name

LOAD_BALANCER=$1

Zabbix Host

ZABBIX_HOST=$2

Zabbix Server

ZABBIX_SERVER=$3

AWS Account

ACCOUNT=$4

AWS Region

REGION=$5

In your ELB template, i saw this


{$AWS_ACCOUNT}
awscore


{$AWS_REGION}
us-east-1

I'm really confused. Can you please tell me the detail how to do? I'm not sure if i should use MACRO or something, i just want to get my specific ELB's metric and see their graph with data.
So what do i have to change value in cron.ELB.sh and ELB template?
Given my condition is: ELB named B, region is ap-southeast-1.

@omni-lchen
Copy link
Owner

That is bash wrapper script, you need to set the zabbix host, server, elb parameters in cronjob, see cron.d/crontab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants