zabbix-cloudwatch 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- data.tar.gz: e5e54a22a40a53783759bf0d706844624b06e12e
4
- metadata.gz: 94712ee0291e1e070547bd4cc13e29d6292c481d
3
+ metadata.gz: 20e69415398bb85c6d7d8541c92b271de26b64d3
4
+ data.tar.gz: 94a08809d18903fe2d358e1601761dd75957ee96
5
5
  SHA512:
6
- data.tar.gz: fef695c594152393744977565a2214ce2826952c70d5f8d178ecac56eb6b3353b0ed61f9e7cd01ae63fe8a29ae3c2c134e593c42e8d23427a9c12fcd1280ce96
7
- metadata.gz: 96db89212bc7a28f33b8b98f45196369e76bc365f5a7a1f6ed523949149f3d0301ede8ddba8cfea8601e9674791fd72874f3c5e0bfd20f792ebc8ac32bb3d960
6
+ metadata.gz: 11784a6df6ded7584105843bdadd452cf48c4b78cda4775e6ca2041c918fec769702801dac08132da44a3615b101f48bacc7857e21200810a82803df9b6198fa
7
+ data.tar.gz: 298df00a3a466cdb900220e31a3db8a82f93d50feb5fabf6f2eac08809867b110470fae2f26cb0ee880aba0293b54920d2adc2d169a749363adcedc3c91bfea2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zabbix-cloudwatch (0.0.2)
4
+ zabbix-cloudwatch (0.0.3)
5
5
  aws-sdk (~> 1.21.0)
6
6
  getopt (~> 1.4.1)
7
7
 
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  An external script for getting cloudwatch metrics into Zabbix
5
5
 
6
6
  ```
7
- Usage: get_aws_cloudwatch_metric.rb
7
+ Usage: zabbix-cloudwatch
8
8
 
9
9
  -h, --help This Message
10
10
  -n, --namespace Namespace (AWS/Autoscaling, AWS/EC2, etc...)
@@ -13,33 +13,32 @@ Usage: get_aws_cloudwatch_metric.rb
13
13
  -v, --dimension-value Dimension Value
14
14
  -t, --monitoring-type detailed|basic Default: basic
15
15
  -s, --statistic Minimum|Maximum|Average|Sum|SampleCount Default: Average
16
+ --aws-access-key AWS Access Key
17
+ --aws-secret-key AWS Secret Key
18
+ --aws-region AWS Region (us-east-1) Default: us-east-1
16
19
  ```
17
20
 
18
21
  ## Getting it running
19
22
 
20
- * It is only guaranteed to work on ruby 1.8.7 at this time.
23
+ * It is only guaranteed to work on ruby 1.8.7 at this time and will throw an Exception on other rubies.
21
24
  * for some of the gem dependencies, you will need the ruby development packages, gcc, libxml2, and libxslt
22
25
 
23
26
  Modify these steps to taste (examples given running on the Amazon AMI 2013.03):
24
27
  ```
25
- # git clone git@github.com:randywallace/zabbix-cloudwatch.git /usr/local/zabbix-cloudwatch
26
- # cd /usr/local/zabbix-cloudwatch
27
- # chown zabbix:zabbix get_aws_cloudwatch_metric.rb
28
28
  # yum install ruby ruby-devel rubygems gcc libxml2-devel libxslt-devel
29
- # gem install bundler
30
- # bundle install
31
- # ln -s /usr/local/zabbix-cloudwatch/get_aws_cloudwatch_metric.rb /var/lib/zabbixsrv/externalscripts/get_aws_cloudwatch_metric.rb
29
+ # gem install bundler zabbix-cloudwatch
30
+ # ln -s $(which zabbix-cloudwatch) /var/lib/zabbixsrv/externalscripts/zabbix-cloudwatch
32
31
  ```
33
32
 
34
33
  ## Examples
35
34
 
36
35
  ```
37
- /usr/local/zabbix-cloudwatch/get_aws_cloudwatch_metric.rb -n AWS/EC2 \
38
- -m CPUUtilization \
39
- -d AutoScalingGroupName \
40
- -v your-auto-scaling-group \
41
- -t detailed \
42
- -s Sum
36
+ zabbix-cloudwatch -n AWS/EC2 \
37
+ -m CPUUtilization \
38
+ -d AutoScalingGroupName \
39
+ -v your-auto-scaling-group \
40
+ -t detailed \
41
+ -s Sum
43
42
  ```
44
43
 
45
44
  ## Creating the IAM User
@@ -51,24 +50,32 @@ The following actions need to be allowed in IAM for this script to work with the
51
50
  "cloudwatch:GetMetricStatistics"
52
51
  ```
53
52
 
54
- ## Notes
53
+ ## AWS Credentials
55
54
 
56
- The class variables within get_aws_cloudwatch_metric.rb should be set if you do not (or don't want to) set environment
57
- variables for your AWS Credentials.
55
+ There are (3) ways to get your AWS Credentials into `zabbix-cloudwatch`.
58
56
 
59
- The default behavior is to use the Environment variables *only* if the variables in the script are not set.
57
+ **Note that *none* of these options are "safe", so make sure you are using a set of IAM Keys with extremely restricted
58
+ permissions.**
60
59
 
61
- ### Setting the Environment variables
60
+ ### 1. Environment Variables (which is difficult with Zabbix):
62
61
  ```
63
62
  export AWS_ACCESS_KEY_ID="YOUR ACCESS KEY"
64
63
  export AWS_SECRET_ACCESS_KEY="YOUR SECRET ACCESS KEY"
65
64
  export AWS_REGION="YOUR AWS REGION"
66
65
  ```
67
66
 
68
- ### Class variables at the top of get_aws_cloudwatch_metric.rb
69
- ```
70
- @@aws_access_key=''
71
- @@aws_secret_key=''
72
- @@aws_region=''
73
- ```
67
+ ### 2. Within the binary in the gem.
68
+
69
+ Find it with `which zabbix-cloudwatch`. If you intend to do it this way, I suggest you make a copy of the binary
70
+ and place it in your zabbix externalscript path (instead of the suggested symlink in the installation example).
71
+
72
+ The class variables for this are at the very top of the file for your convenience.
73
+
74
+ ### 3. Passing in your AWS Keys when you run zabbix-cloudwatch using the command line flags.
75
+
76
+ The order of preference that this gem uses for the region and keys (individually) are:
77
+
78
+ * Commandline flag
79
+ * Within the binary
80
+ * Environment Variable
74
81
 
@@ -1,4 +1,4 @@
1
1
 
2
2
  module ZabbixCloudwatch
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix-cloudwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Randy D. Wallace Jr.