sensu-plugins-aws 18.1.0 → 18.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -1
- data/README.md +5 -1
- data/bin/check-ebs-burst-limit.rb +19 -12
- data/bin/check-rds.rb +14 -2
- data/lib/sensu-plugins-aws/version.rb +2 -2
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6b3463eeb37eec8717ee8d375bab0a6cbaf222cd9c1cc732bc2b89d600acd8b
|
4
|
+
data.tar.gz: dc09e19965e9c4f0e7d39f882bb793e960efa125961eba76f5e7b722bd4abf8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7deb8036dca239d9c6c252efd1067378e4a06e1d1448aa3029b57dea7968738d09baabcbc39e2a90547453709d72c0cf625c80b9f3bf8bb7d54aab6ad8290e1f
|
7
|
+
data.tar.gz: 401a4c0388a510e10da6f24f32ec76c7babfaa0154238a18adfac53ff0a8528a3e98afcfaf8ad6ad887b77ddd7a660bc9b82b91c20c37f7fe399d7f2f393a01f
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,27 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [18.4.2] - 2019-09-23
|
9
|
+
### Fixed
|
10
|
+
- Properly parse `--db-cluster-id` option in `check-rds.rb` (@rwha)
|
11
|
+
|
12
|
+
|
13
|
+
## [18.4.1] - 2019-08-21
|
14
|
+
### Security
|
15
|
+
- force newer version of nokogiri to address CVE-2019-5477 (@majormoses)
|
16
|
+
|
17
|
+
## [18.4.0] - 2019-05-08
|
18
|
+
### Added
|
19
|
+
- `check-ebs-burst-limit.rb`: `--filter` option added to filter which volume to check. (@boutetnico)
|
20
|
+
|
21
|
+
## [18.3.0] - 2019-05-07
|
22
|
+
### Added
|
23
|
+
- Travis build automation to generate Sensu Asset tarballs that can be used in conjunction with Sensu provided ruby runtime assets and the Bonsai Asset Index
|
24
|
+
|
25
|
+
## [18.2.0] - 2019-05-06
|
26
|
+
### Added
|
27
|
+
- check-rds.rb: added support for new `t3` and `r5` family instances (@mmitucha)
|
28
|
+
|
8
29
|
## [18.1.0] - 2019-05-06
|
9
30
|
### Added
|
10
31
|
- `check-ec2-cpu_balance.rb`: `--filter` option added to filter which instance to check. (@boutetnico)
|
@@ -574,7 +595,12 @@ WARNING: This release contains major breaking changes that will impact all user
|
|
574
595
|
### Added
|
575
596
|
- initial release
|
576
597
|
|
577
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.
|
598
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.4.2...HEAD
|
599
|
+
[18.4.2]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.4.1...18.4.2
|
600
|
+
[18.4.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.4.0...18.4.1
|
601
|
+
[18.4.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.3.0...18.4.0
|
602
|
+
[18.3.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.2.0...18.3.0
|
603
|
+
[18.2.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.1.0...18.2.0
|
578
604
|
[18.1.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.0.0...18.1.0
|
579
605
|
[18.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/17.2.0...18.0.0
|
580
606
|
[17.2.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/17.1.0...17.2.0
|
data/README.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-aws.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-aws)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-aws.svg)](https://badge.fury.io/rb/sensu-plugins-aws.svg)
|
5
|
+
[![Sensu Bonsai Asset](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967&logo=sensu)](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-aws)
|
6
|
+
|
7
|
+
## Sensu Asset
|
8
|
+
The Sensu assets packaged from this repository are built against the Sensu Ruby runtime environment. When using these assets as part of a Sensu Go resource (check, mutator or handler), make sure you include the corresponding Sensu Ruby runtime asset in the list of assets needed by the resource. The current ruby-runtime assets can be found [here](https://bonsai.sensu.io/assets/sensu/sensu-ruby-runtime) in the [Bonsai Asset Index](bonsai.sensu.io).
|
5
9
|
|
6
10
|
## Functionality
|
7
11
|
|
@@ -283,7 +287,7 @@
|
|
283
287
|
|
284
288
|
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
285
289
|
|
286
|
-
Note: In addition to the standard installation requirements the installation of this gem will require compiling the nokogiri gem. Due to this you'll need certain development packages on your system.
|
290
|
+
Note: In addition to the standard installation requirements the installation of this gem will require compiling the nokogiri gem. Due to this you'll need certain development packages on your system.
|
287
291
|
|
288
292
|
On Ubuntu systems run the following to install build dependencies:
|
289
293
|
|
@@ -20,6 +20,7 @@
|
|
20
20
|
# ./check-ebs-burst-limit.rb -r ${you_region}
|
21
21
|
# ./check-ebs-burst-limit.rb -r ${you_region} -c 50
|
22
22
|
# ./check-ebs-burst-limit.rb -r ${you_region} -w 50 -c 10
|
23
|
+
# ./check-ebs-burst-limit.rb -r ${you_region} -w 50 -c 10 -f "{name:tag-value,values:[infrastructure]}"
|
23
24
|
#
|
24
25
|
# LICENSE:
|
25
26
|
# Barry Martin <nyxcharon@gmail.com>
|
@@ -29,11 +30,13 @@
|
|
29
30
|
|
30
31
|
require 'sensu-plugin/check/cli'
|
31
32
|
require 'sensu-plugins-aws'
|
33
|
+
require 'sensu-plugins-aws/filter'
|
32
34
|
require 'aws-sdk'
|
33
35
|
require 'net/http'
|
34
36
|
|
35
37
|
class CheckEbsBurstLimit < Sensu::Plugin::Check::CLI
|
36
38
|
include CloudwatchCommon
|
39
|
+
include Filter
|
37
40
|
|
38
41
|
option :aws_region,
|
39
42
|
short: '-r R',
|
@@ -61,29 +64,33 @@ class CheckEbsBurstLimit < Sensu::Plugin::Check::CLI
|
|
61
64
|
boolean: true,
|
62
65
|
default: false
|
63
66
|
|
67
|
+
option :filter,
|
68
|
+
short: '-f FILTER',
|
69
|
+
long: '--filter FILTER',
|
70
|
+
description: 'String representation of the filter to apply',
|
71
|
+
default: '{}'
|
72
|
+
|
64
73
|
def run
|
65
74
|
errors = []
|
66
75
|
|
76
|
+
volume_filters = Filter.parse(config[:filter])
|
77
|
+
|
67
78
|
# Set the describe-volumes filter depending on whether -s was specified
|
68
79
|
if config[:check_self] == true
|
69
80
|
# Get the region from the availability zone, and override the -r option
|
70
81
|
my_instance_az = Net::HTTP.get(URI.parse('http://169.254.169.254/latest/meta-data/placement/availability-zone'))
|
71
82
|
Aws.config[:region] = my_instance_az.chop
|
72
83
|
my_instance_id = Net::HTTP.get(URI.parse('http://169.254.169.254/latest/meta-data/instance-id'))
|
73
|
-
volume_filters
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
}
|
78
|
-
]
|
84
|
+
volume_filters.push(
|
85
|
+
name: 'attachment.instance-id',
|
86
|
+
values: [my_instance_id]
|
87
|
+
)
|
79
88
|
else
|
80
89
|
# The -s option was not specified, look at all volumes which are attached
|
81
|
-
volume_filters
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
}
|
86
|
-
]
|
90
|
+
volume_filters.push(
|
91
|
+
name: 'attachment.status',
|
92
|
+
values: ['attached']
|
93
|
+
)
|
87
94
|
end
|
88
95
|
|
89
96
|
ec2 = Aws::EC2::Client.new
|
data/bin/check-rds.rb
CHANGED
@@ -161,7 +161,7 @@ class CheckRDS < Sensu::Plugin::Check::CLI
|
|
161
161
|
|
162
162
|
def find_db_cluster_writer(id)
|
163
163
|
wr = rds.describe_db_clusters(db_cluster_identifier: id).db_clusters[0].db_cluster_members.detect(&:is_cluster_writer).db_instance_identifier
|
164
|
-
unknown 'DB cluster not found.' if
|
164
|
+
unknown 'DB cluster not found.' if wr.nil?
|
165
165
|
wr
|
166
166
|
end
|
167
167
|
|
@@ -231,6 +231,12 @@ class CheckRDS < Sensu::Plugin::Check::CLI
|
|
231
231
|
'db.r4.4xlarge' => 122.0,
|
232
232
|
'db.r4.8xlarge' => 244.0,
|
233
233
|
'db.r4.16xlarge' => 488.0,
|
234
|
+
'db.r5.large' => 16.0,
|
235
|
+
'db.r5.xlarge' => 32.0,
|
236
|
+
'db.r5.2xlarge' => 64.0,
|
237
|
+
'db.r5.4xlarge' => 128.0,
|
238
|
+
'db.r5.12xlarge' => 384.0,
|
239
|
+
'db.r5.24xlarge' => 768.0,
|
234
240
|
'db.t1.micro' => 0.615,
|
235
241
|
'db.t2.micro' => 1.0,
|
236
242
|
'db.t2.small' => 2.0,
|
@@ -238,6 +244,12 @@ class CheckRDS < Sensu::Plugin::Check::CLI
|
|
238
244
|
'db.t2.large' => 8.0,
|
239
245
|
'db.t2.xlarge' => 16.0,
|
240
246
|
'db.t2.2xlarge' => 32.0,
|
247
|
+
'db.t3.micro' => 1.0,
|
248
|
+
'db.t3.small' => 2.0,
|
249
|
+
'db.t3.medium' => 4.0,
|
250
|
+
'db.t3.large' => 8.0,
|
251
|
+
'db.t3.xlarge' => 16.0,
|
252
|
+
'db.t3.2xlarge' => 32.0,
|
241
253
|
'db.x1.16xlarge' => 976.0,
|
242
254
|
'db.x1.32xlarge' => 1952.0,
|
243
255
|
'db.x1e.xlarge' => 122.0,
|
@@ -309,7 +321,7 @@ class CheckRDS < Sensu::Plugin::Check::CLI
|
|
309
321
|
def run
|
310
322
|
instances = []
|
311
323
|
if config[:db_cluster_id]
|
312
|
-
db_cluster_writer_id = find_db_cluster_writer(db_cluster_id)
|
324
|
+
db_cluster_writer_id = find_db_cluster_writer(config[:db_cluster_id])
|
313
325
|
instances << find_db_instance(db_cluster_writer_id)
|
314
326
|
end
|
315
327
|
|
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: 18.
|
4
|
+
version: 18.4.2
|
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: 2019-
|
11
|
+
date: 2019-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -80,6 +80,26 @@ dependencies:
|
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.43.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: nokogiri
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.10.4
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '2.0'
|
93
|
+
type: :runtime
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 1.10.4
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '2.0'
|
83
103
|
- !ruby/object:Gem::Dependency
|
84
104
|
name: rest-client
|
85
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -424,7 +444,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
424
444
|
- !ruby/object:Gem::Version
|
425
445
|
version: '0'
|
426
446
|
requirements: []
|
427
|
-
rubygems_version: 3.0.
|
447
|
+
rubygems_version: 3.0.6
|
428
448
|
signing_key:
|
429
449
|
specification_version: 4
|
430
450
|
summary: Sensu plugins for working with an AWS environment
|