sensu-plugins-aws 6.0.1 → 6.1.0

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
- metadata.gz: b033a2356552a4236375fa098d94437d9c45ad95
4
- data.tar.gz: caf3f47b3699ce4ded5de4be24880fe96d3d82e5
3
+ metadata.gz: 3cdde9fa46f872658ce2396d7bf0f2f5862e9a86
4
+ data.tar.gz: 6342b8ccc60c5ed59c362346d57af0bbdcd40b3c
5
5
  SHA512:
6
- metadata.gz: 3c97e49b9ba0c8dccaffc218208a4f2a829d6dcc2e0ac5aba7eb83d589f8217bd63aae4e85c6d5e5d2f78ad28415d459c98e0e9c681718a6ae6d5033c1091ea2
7
- data.tar.gz: 8a6214038280fd0edd711ec63fc67503daded445fca460f04292b76f59f44dca6039a361dfa1a0447bd77ccd411f71f796e1f1187950e3b0445a759b3daabf9d
6
+ metadata.gz: d721df6822b4df50b498de6a2172d37827da1a2b8ad6224d5be4f90749ab45961d988cf6712cd4ffa165135da52b38198ff0657c034bdc8536d3ca6bc221c915
7
+ data.tar.gz: a04f839915ef6cb365c276b4c6d2e972d62a7fd3bbc7f358be49c0a1711f9465c724963bb8539dbae96cbf4a82a2bb1f78ef8490496f21e13415fd71e84af9d7
data/CHANGELOG.md CHANGED
@@ -4,11 +4,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
6
  ## [Unreleased]
7
- ## [6.0.1] 2017-05-11
7
+
8
+ ## [6.1.0] - 2017-06-23
9
+ ### Added
10
+ - check-eni-status.rb: new check to monitor the status of one or more ENI
11
+
12
+ ## [6.0.1] - 2017-05-11
8
13
  ### Fixed
9
14
  - check-instance-events.rb: fix instance Name tag retrieval that broke upon aws sdk v2 update, and update output message handling (@swibowo)
10
15
 
11
- ## 6.0.0
16
+ ## [6.0.0] - 2017-05-10
12
17
  ### Breaking Change
13
18
  - check-elb-nodes.rb returns critical instead of unknown if total number of nodes equals zero (@autarchprinceps)
14
19
 
@@ -307,12 +312,13 @@ WARNING: This release contains major breaking changes that will impact all user
307
312
  ### Added
308
313
  - initial release
309
314
 
310
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.0.1...HEAD
315
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.1.0...HEAD
316
+ [6.1.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.0.1...6.1.0
311
317
  [6.0.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.0.0...6.0.1
312
318
  [6.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/5.1.0...6.0.0
313
- [5.1.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/5.1.0...5.0.0
314
- [5.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/5.0.0...4.1.0
315
- [4.1.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/4.1.0...4.0.0
319
+ [5.1.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/5.0.0...5.1.0
320
+ [5.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/4.1.0...5.0.0
321
+ [4.1.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/4.0.0...4.1.0
316
322
  [4.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/3.2.1...4.0.0
317
323
  [3.2.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/3.2.0...3.2.1
318
324
  [3.2.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/3.1.0...3.2.0
data/README.md CHANGED
@@ -68,6 +68,8 @@
68
68
 
69
69
  **check-emr-steps.rb**
70
70
 
71
+ **check-eni-status.rb**
72
+
71
73
  **check-instance-events.rb**
72
74
 
73
75
  **check-instance-health.rb**
@@ -175,6 +177,7 @@
175
177
  * /bin/check-elb-sum-requests.rb
176
178
  * /bin/check-emr-cluster.rb
177
179
  * /bin/check-emr-steps.rb
180
+ * /bin/check-eni-status.rb
178
181
  * /bin/check-instance-events.rb
179
182
  * /bin/check-rds-events.rb
180
183
  * /bin/check-rds-pending.rb
@@ -40,14 +40,14 @@ class CheckEbsBurstLimit < Sensu::Plugin::Check::CLI
40
40
  default: 'us-east-1'
41
41
 
42
42
  option :critical,
43
- description: 'Trigger a critical when ebs purst limit is under VALUE',
43
+ description: 'Trigger a critical when ebs burst limit is under VALUE',
44
44
  short: '-c VALUE',
45
45
  long: '--critical VALUE',
46
46
  proc: proc(&:to_f),
47
47
  required: true
48
48
 
49
49
  option :warning,
50
- description: 'Trigger a warning when ebs purst limit is under VALUE',
50
+ description: 'Trigger a warning when ebs burst limit is under VALUE',
51
51
  short: '-w VALUE',
52
52
  long: '--warning VALUE',
53
53
  proc: proc(&:to_f)
@@ -0,0 +1,110 @@
1
+ #! /usr/bin/env ruby
2
+ #
3
+ # check-eni-status
4
+ #
5
+ # DESCRIPTION:
6
+ # This plugin checks the status of an elastic network interface
7
+ #
8
+ # OUTPUT:
9
+ # plain-text
10
+ #
11
+ # PLATFORMS:
12
+ # Linux
13
+ #
14
+ # DEPENDENCIES:
15
+ # gem: aws-sdk-v2
16
+ # gem: sensu-plugin
17
+ #
18
+ # USAGE:
19
+ # check-eni-status -e eni -w in-use -r region
20
+ # check-eni-status -e eni -c available -r region
21
+ #
22
+ # NOTES:
23
+ #
24
+ # LICENSE:
25
+ # Copyright (c) 2013, Damien DURANT <damien.durant@edifixio.com>
26
+ # Released under the same terms as Sensu (the MIT license); see LICENSE
27
+ # for details.
28
+ #
29
+
30
+ require 'sensu-plugin/check/cli'
31
+ require 'sensu-plugins-aws'
32
+ require 'aws-sdk'
33
+
34
+ #
35
+ # Check ENI Status
36
+ #
37
+ class ENIStatus < Sensu::Plugin::Check::CLI
38
+ include Common
39
+
40
+ option :aws_region,
41
+ short: '-r AWS_REGION',
42
+ long: '--aws-region REGION',
43
+ description: 'AWS Region (defaults to us-east-1).',
44
+ default: 'us-east-1'
45
+
46
+ option :eni,
47
+ short: '-e ENI_ID',
48
+ long: '--eni ENI_ID',
49
+ description: 'A comma seperated list of the Elastic Network Interfaces to check',
50
+ default: ''
51
+
52
+ option :warn_status,
53
+ short: '-w STATUS',
54
+ long: '--warn STATUS',
55
+ description: 'ENI status considered to be a warning',
56
+ default: ''
57
+
58
+ option :crit_status,
59
+ short: '-c STATUS',
60
+ long: '--crit STATUS',
61
+ description: 'ENI status considered to be critical',
62
+ default: ''
63
+
64
+ def aws_config
65
+ { access_key_id: config[:aws_access_key],
66
+ secret_access_key: config[:aws_secret_access_key],
67
+ region: config[:aws_region] }
68
+ end
69
+
70
+ def run
71
+ Aws.config.update(aws_config)
72
+ client = Aws::EC2::Client.new
73
+
74
+ if config[:eni].empty?
75
+ critical 'Error, ENI(s) should be specified.'
76
+ end
77
+
78
+ if config[:crit_status].empty?
79
+ if config[:warn_status].empty?
80
+ critical 'Error, either crit_status or warn_status must be specified'
81
+ end
82
+ end
83
+
84
+ warnings = []
85
+ crits = []
86
+
87
+ eni = config[:eni].split(',')
88
+ eni.each do |e|
89
+ status = client.describe_network_interfaces(
90
+ filters: [{ name: 'network-interface-id', values: [e] }]
91
+ )[:network_interfaces].first
92
+
93
+ if status.nil?
94
+ warnings << "No Information found for #{e}"
95
+ elsif config[:crit_status].casecmp(status[:status]) == 0
96
+ crits << "#{e} is #{status[:status]}"
97
+ elsif config[:warn_status].casecmp(status[:status]) == 0
98
+ warnings << "#{e} is #{status[:status]}"
99
+ end
100
+ end
101
+
102
+ if crits.any?
103
+ critical crits.join(', ').to_s
104
+ elsif warnings.any?
105
+ warning warnings.join(', ').to_s
106
+ else
107
+ ok "all queue(s): #{queues} are OK"
108
+ end
109
+ end
110
+ end
@@ -12,12 +12,12 @@
12
12
  # Linux
13
13
  #
14
14
  # DEPENDENCIES:
15
- # gem: aws-sdk-v1
15
+ # gem: aws-sdk-v2
16
16
  # gem: sensu-plugin
17
17
  #
18
18
  # USAGE:
19
- # check-sqs-messages -q my_queue -a key -k secret -w 500 -c 1000
20
- # check-sqs-messages -p queue_prefix_ -a key -k secret -W 100 -C 50
19
+ # check-sqs-messages -q my_queue -w 500 -c 1000
20
+ # check-sqs-messages -p queue_prefix_ -W 100 -C 50
21
21
  #
22
22
  # NOTES:
23
23
  #
@@ -56,7 +56,7 @@ class SQSMsgs < Sensu::Plugin::Check::CLI
56
56
  default: ''
57
57
 
58
58
  option :metric,
59
- short: '-m METTIC',
59
+ short: '-m METRIC',
60
60
  long: '--metric METRIC',
61
61
  description: 'The metric of the queues you want to check the number of messages for',
62
62
  default: 'ApproximateNumberOfMessages'
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsAWS
2
2
  module Version
3
3
  MAJOR = 6
4
- MINOR = 0
5
- PATCH = 1
4
+ MINOR = 1
5
+ PATCH = 0
6
6
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-12 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -287,6 +287,7 @@ executables:
287
287
  - check-elb-sum-requests.rb
288
288
  - check-emr-cluster.rb
289
289
  - check-emr-steps.rb
290
+ - check-eni-status.rb
290
291
  - check-instance-events.rb
291
292
  - check-instance-health.rb
292
293
  - check-instance-reachability.rb
@@ -366,6 +367,7 @@ files:
366
367
  - bin/check-elb-sum-requests.rb
367
368
  - bin/check-emr-cluster.rb
368
369
  - bin/check-emr-steps.rb
370
+ - bin/check-eni-status.rb
369
371
  - bin/check-instance-events.rb
370
372
  - bin/check-instance-health.rb
371
373
  - bin/check-instance-reachability.rb