Open fatgit opened 8 years ago
I also try: zabbix-cloudwatch --aws-access-key $AWSACCESSKEY --aws-secret-key $AWSSECRETKEY --aws-region eu-west-1 --namespace AWS/EC2 --metricname CPUUtilization --dimension-name InstanceId i-6a80xxx
And I get a list of errors:
/usr/local/rvm/gems/ruby-2.1.8/gems/getopt-1.4.3/lib/getopt/long.rb:152:in block in getopts': invalid switch 'i-6a80e1e2' (Getopt::Long::Error) from /usr/local/rvm/gems/ruby-2.1.8/gems/getopt-1.4.3/lib/getopt/long.rb:91:in
each'
from /usr/local/rvm/gems/ruby-2.1.8/gems/getopt-1.4.3/lib/getopt/long.rb:91:in each_with_index' from /usr/local/rvm/gems/ruby-2.1.8/gems/getopt-1.4.3/lib/getopt/long.rb:91:in
getopts'
from /usr/local/zabbix-cloudwatch/bin/zabbix-cloudwatch:16:in <top (required)>' from /usr/local/rvm/gems/ruby-2.1.8/bin/zabbix-cloudwatch:23:in
load'
from /usr/local/rvm/gems/ruby-2.1.8/bin/zabbix-cloudwatch:23:in <main>' from /usr/local/rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in
eval'
from /usr/local/rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `
It is a sintaxe problem?
Tks
You guys might want to try this fork: https://github.com/CheggEng/zabbix-cloudwatch
We stopped using Zabbix (in favor of Sensu) a couple years ago; as such, this has fallen into disrepair. Forgive me, but I don't have the time to look into this right now :(
Ah, I see, -d
is the Dimension Name from Cloudwatch, which in this case would be 'InstanceId'; then you would need a value for that Dimension Name, -v <instance_id>
. Try that, and see if it works.
/usr/local/bin/zabbix-cloudwatch -n AWS/EC2 -m CPUUtilization -d InstanceId -v i-d336b210 --aws-access-key MY_ACCESS --aws-secret-key MY_SECRET --aws-region us-west-1
thanks for answer, but I get the errror
/usr/local/share/gems/gems/getopt-1.4.3/lib/getopt/long.rb:152:in block in getopts': invalid switch 'i-d336b210' (Getopt::Long::Error) from /usr/local/share/gems/gems/getopt-1.4.3/lib/getopt/long.rb:91:in
each'
from /usr/local/share/gems/gems/getopt-1.4.3/lib/getopt/long.rb:91:in each_with_index' from /usr/local/share/gems/gems/getopt-1.4.3/lib/getopt/long.rb:91:in
getopts'
from /usr/local/share/gems/gems/zabbix-cloudwatch-0.2.0/bin/zabbix-cloudwatch:16:in <top (required)>' from /usr/local/bin/zabbix-cloudwatch:23:in
load'
from /usr/local/bin/zabbix-cloudwatch:23:in `
Ok. I will try the fork
Please, give me example as I can get "CPU Utilization" from ec2 instance I try /usr/local/bin/zabbix-cloudwatch -n AWS/EC2 -m CPUUtilization -d i-d336b210 --aws-access-key MY_ACCESS --aws-secret-key MY_SECRET --aws-region us-west-1
but have error