upstreamstatus 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/upstreamstatus.rb +2 -6
- data/lib/upstreamstatus/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef5044e79defd768b4025d6174301b3a726d6f16
|
4
|
+
data.tar.gz: 664dc56b3f95d0a759b75b3be95044069ceb5626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d369903baab9059b51b272db1fe2e5e715e7631ade8bee938bc4d4dde92326f6960ab9ea38e5fd83663d2221696e8063ed74c8dffb8220e5772927adf2a5e5e
|
7
|
+
data.tar.gz: 4be7a4354decbc9c8978fd0553457b712cc9627ed144a094dfc1025167056082e14e989d27b9ed3affb3bbf41ab0826e35eafe4b22fad30add6094b5488239bb
|
data/lib/upstreamstatus.rb
CHANGED
@@ -43,6 +43,7 @@ class Upstreamstatus
|
|
43
43
|
Unirest.default_header 'Authorization',
|
44
44
|
"Token token=#{pagerduty_rest_api_key}"
|
45
45
|
Unirest.default_header 'Content-type', 'application/json'
|
46
|
+
Unirest.default_header 'Accept', 'application/vnd.pagerduty+json;version=2'
|
46
47
|
|
47
48
|
Raven.configure do |config|
|
48
49
|
config.dsn = sentry_dsn
|
@@ -133,12 +134,7 @@ class Upstreamstatus
|
|
133
134
|
|
134
135
|
def active_alerts_paged(offset = 0)
|
135
136
|
r = Unirest.get(
|
136
|
-
"#{pagerduty_api_url}/incidents"
|
137
|
-
parameters: {
|
138
|
-
service: pagerduty_service_id,
|
139
|
-
status: 'triggered,acknowledged',
|
140
|
-
offset: offset
|
141
|
-
}
|
137
|
+
"#{pagerduty_api_url}/incidents?service_ids[]=#{pagerduty_service_id}&statuses[]=triggered&statuses[]=acknowledged&offset=#{offset}"
|
142
138
|
)
|
143
139
|
fail "Result: #{r.inspect}" unless (200..299).include?(r.code)
|
144
140
|
pointer = r.body['limit'] + offset
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upstreamstatus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Herot
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unirest
|
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
181
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.5
|
182
|
+
rubygems_version: 2.4.5
|
183
183
|
signing_key:
|
184
184
|
specification_version: 4
|
185
185
|
summary: Parse the output of the Nginx Upstream Check plugin
|