sensu-plugins-pagerduty 3.0.1 → 3.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 +9 -1
- data/bin/handler-pagerduty.rb +7 -3
- data/lib/sensu-plugins-pagerduty/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a619eda66ee13a52fc0f89bd6308696c584bc81a57b009c63620d7d255fb3caa
|
4
|
+
data.tar.gz: 2a99da1c7d3c6b5dfd540703b71fbc95d65f7f4d39ccae0a430ca54f0187c1ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3af328bb52fdf31240b71c563d906bc8dc513384a212c34563d0479d89dff4e9b5575feb0eb38746246acfa46f4d175082c1edcc697b4df9fe3fc1324a1d1dd8
|
7
|
+
data.tar.gz: b7ea8751a04ee3ec249a563fd6678a078f31f0923c52bd0ab64f7610eaa6dcacb92400e3a104141668a39ef4f4cc8ef053d351a5799e4f24472e18a6f659fbcd
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,13 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [3.1.0] - 2018-03-17
|
9
|
+
### Added
|
10
|
+
- error handling when `json_config` key is not found to help users deal with the problem. Not great but better than a `NilClass` error (@majormoses)
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
- changed the description of `json_config` to reflect that this is a key not the json file (@majormoses)
|
14
|
+
|
8
15
|
## [3.0.1] - 2018-02-16
|
9
16
|
### Added
|
10
17
|
- ruby 2.4 testing (@majormoses)
|
@@ -115,7 +122,8 @@ marking it as a stable 1.0.0 release.
|
|
115
122
|
### Added
|
116
123
|
- initial release
|
117
124
|
|
118
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.0
|
125
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.1.0...HEAD
|
126
|
+
[3.1.0]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.0.1...3,1.0
|
119
127
|
[3.0.1]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.0.0...3.0.1
|
120
128
|
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/2.2.0...3.0.0
|
121
129
|
[2.2.0]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/2.1.0...2.2.0
|
data/bin/handler-pagerduty.rb
CHANGED
@@ -25,9 +25,9 @@ require 'pagerduty'
|
|
25
25
|
#
|
26
26
|
class PagerdutyHandler < Sensu::Handler
|
27
27
|
option :json_config,
|
28
|
-
description: 'Config Name',
|
29
|
-
short: '-j
|
30
|
-
long: '--json_config
|
28
|
+
description: 'Config key Name, this is not a path to a file but rather the key name within sensu to check',
|
29
|
+
short: '-j JsonConfigKey',
|
30
|
+
long: '--json_config JsonConfigKey',
|
31
31
|
required: false,
|
32
32
|
default: 'pagerduty'
|
33
33
|
|
@@ -83,6 +83,10 @@ class PagerdutyHandler < Sensu::Handler
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def handle(pd_client = nil)
|
86
|
+
if settings[json_config].nil?
|
87
|
+
p "invalid config: #{options[:json_config]} you need to pass a key and not a file"
|
88
|
+
exit 3 # unknown
|
89
|
+
end
|
86
90
|
incident_key_prefix = settings[json_config]['incident_key_prefix']
|
87
91
|
description_prefix = description_prefix()
|
88
92
|
proxy_settings = proxy_settings()
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-pagerduty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.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-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|