sensu-plugins-puppet 2.0.0 → 2.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 -2
- data/bin/check-puppet-last-run.rb +31 -0
- data/lib/sensu-plugins-puppet/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8286374fc3da962e98181bd2e6ff81a23893c6c9b4938d31acc6d8ce3f196a6
|
4
|
+
data.tar.gz: 4b436ad2912723b2635975e753af3e760f8f7571e8b0904ca3ee7ab46ae3c0eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1115da93aa51da224badd0d7008c178a03e51d8bef964198087c7c26017c9ca21e61888cfd127af52180033587a244ae4968ca27e365ffbbea95ec22c763d9ab
|
7
|
+
data.tar.gz: 8a922a3b04a7a16083308dbeaeca14ade7b72fa7c38c43a1f7e681b52107c656b84f5646407ef9b789bc88b582e3c57446719d33e733131b6a22e6b5daa8687d
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
-
#Change Log
|
1
|
+
# Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [2.1.0] - 2018-02-16
|
9
|
+
### Added
|
10
|
+
- Added options to allow for different age limits when the agent is disabled
|
11
|
+
- Added a switch to use the new limits so as not to impact current functionality
|
12
|
+
|
8
13
|
## [2.0.0] - 2018-01-31
|
9
14
|
### Security
|
10
15
|
- updated `rubocop` dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@jaredledvina)
|
@@ -51,7 +56,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
51
56
|
### Added
|
52
57
|
- initial release
|
53
58
|
|
54
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-puppet/compare/2.
|
59
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-puppet/compare/2.1.0...HEAD
|
60
|
+
[2.1.0]: https://github.com/sensu-plugins/sensu-plugins-puppet/compare/2.0.0...2.1.0
|
55
61
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-puppet/compare/1.3.0...2.0.0
|
56
62
|
[1.3.0]: https://github.com/sensu-plugins/sensu-plugins-puppet/compare/1.2.0...1.3.0
|
57
63
|
[1.2.0]: https://github.com/sensu-plugins/sensu-plugins-puppet/compare/1.1.0...1.2.0
|
@@ -59,6 +59,27 @@ class PuppetLastRun < Sensu::Plugin::Check::CLI
|
|
59
59
|
default: '/opt/puppetlabs/puppet/cache/state/agent_disabled.lock',
|
60
60
|
description: 'Path to agent disabled lock file'
|
61
61
|
|
62
|
+
option :disabled_age_limits,
|
63
|
+
short: '-d',
|
64
|
+
long: '--disabled-age-limits',
|
65
|
+
boolean: true,
|
66
|
+
default: false,
|
67
|
+
description: 'Consider disabled age limits, otherwise use main limits'
|
68
|
+
|
69
|
+
option :warn_age_disabled,
|
70
|
+
short: '-W N',
|
71
|
+
long: '--warn-age-disabled SECONDS',
|
72
|
+
default: 3600,
|
73
|
+
proc: proc(&:to_i),
|
74
|
+
description: 'Age in seconds to warn when agent is disabled'
|
75
|
+
|
76
|
+
option :crit_age_disabled,
|
77
|
+
short: '-C N',
|
78
|
+
long: '--crit-age-disabled SECONDS',
|
79
|
+
default: 7200,
|
80
|
+
proc: proc(&:to_i),
|
81
|
+
description: 'Age in seconds to crit when agent is disabled'
|
82
|
+
|
62
83
|
option :report_restart_failures,
|
63
84
|
short: '-r',
|
64
85
|
long: '--report-restart-failures',
|
@@ -122,6 +143,16 @@ class PuppetLastRun < Sensu::Plugin::Check::CLI
|
|
122
143
|
@message += " with #{@restart_failures} restart failures"
|
123
144
|
end
|
124
145
|
|
146
|
+
if config[:disabled_age_limits] && File.exist?(config[:agent_disabled_file])
|
147
|
+
if @now - @last_run > config[:crit_age_disabled]
|
148
|
+
critical @message
|
149
|
+
elsif @now - @last_run > config[:warn_age_disabled]
|
150
|
+
warning @message
|
151
|
+
else
|
152
|
+
ok @message
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
125
156
|
if @now - @last_run > config[:crit_age] || @failures > 0 || @restart_failures > 0
|
126
157
|
critical @message
|
127
158
|
elsif @now - @last_run > config[:warn_age]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.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: 2018-
|
11
|
+
date: 2018-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.7.
|
199
|
+
rubygems_version: 2.7.6
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Sensu plugins for puppet
|