sensu-plugins-docker 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -3
- data/bin/check-container-logs.rb +12 -3
- data/lib/sensu-plugins-docker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 645a9f3659b23cffcf10ff781afd499f9c7d3e4a
|
4
|
+
data.tar.gz: d767b667130c58182b49a838694ea20d5a6d59ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fba877081039b53878f84ae9a9788bf035a3545942565d3e644edc99720bde99648627a0f2cb806b800d736868dc2ec03b0e85d60435a85ab2c35350cd0437c
|
7
|
+
data.tar.gz: 6badaf7ef560fb6052819500ee71cf9a35ec6d6a79a53e933836641cf6f1d0aa103bcb018af6abe42270d1a1291f67fe9849cdaaf6797aeb896462efc3e6aa4e
|
data/CHANGELOG.md
CHANGED
@@ -5,12 +5,16 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
-
## 1.
|
8
|
+
## [1.1.0] - 2016-06-03
|
9
|
+
### Added
|
10
|
+
- check-container-logs.rb: added `-s|--seconds-ago` option to be able to set time interval more precisely
|
11
|
+
|
12
|
+
## [1.0.0] - 2016-05-24
|
9
13
|
Note: this release changes how connections are made to the Docker API and also
|
10
14
|
changes some options. Review your check commands before deploying this version.
|
11
15
|
|
12
16
|
### Added
|
13
|
-
- Added check-container-logs.rb to check docker logs for matching strings
|
17
|
+
- Added check-container-logs.rb to check docker logs for matching strings
|
14
18
|
- Support for Ruby 2.3.0
|
15
19
|
- metrics-docker-container.rb: add option to override the default path to cgroup.proc
|
16
20
|
|
@@ -42,7 +46,8 @@ changes some options. Review your check commands before deploying this version.
|
|
42
46
|
### Added
|
43
47
|
- initial release
|
44
48
|
|
45
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/1.
|
49
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/1.1.0...HEAD
|
50
|
+
[1.1.0]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/1.0.0...1.1.0
|
46
51
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/0.0.4...1.0.0
|
47
52
|
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/0.0.3...0.0.4
|
48
53
|
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/0.0.2...0.0.3
|
data/bin/check-container-logs.rb
CHANGED
@@ -77,8 +77,14 @@ insensitive',
|
|
77
77
|
long: '--hours-ago HOURS',
|
78
78
|
required: false
|
79
79
|
|
80
|
-
|
81
|
-
|
80
|
+
option :seconds_ago,
|
81
|
+
description: 'Amount of time in seconds to look back for log strings',
|
82
|
+
short: '-s SECONDS',
|
83
|
+
long: '--seconds-ago SECONDS',
|
84
|
+
required: false
|
85
|
+
|
86
|
+
def calculate_timestamp(seconds_ago = nil)
|
87
|
+
seconds_ago = yield if block_given?
|
82
88
|
(Time.now - seconds_ago).to_i
|
83
89
|
end
|
84
90
|
|
@@ -86,8 +92,11 @@ insensitive',
|
|
86
92
|
client = create_docker_client
|
87
93
|
path = "/containers/#{container_name}/logs?stdout=true&stderr=true"
|
88
94
|
if config.key? :hours_ago
|
89
|
-
|
95
|
+
timestamp = calculate_timestamp { config[:hours_ago].to_i * 3600 }
|
96
|
+
elsif config.key? :seconds_ago
|
97
|
+
timestamp = calculate_timestamp config[:seconds_ago].to_i
|
90
98
|
end
|
99
|
+
path = "#{path}&since=#{timestamp}"
|
91
100
|
req = Net::HTTP::Get.new path
|
92
101
|
|
93
102
|
client.request req do |response|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.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: 2016-
|
11
|
+
date: 2016-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|