dogapi 1.37.1 → 1.38.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.azure-pipelines/all.yml +9 -3
- data/.rubocop_todo.yml +35 -53
- data/CHANGELOG.md +13 -0
- data/Gemfile_1.9 +11 -0
- data/lib/dogapi/common.rb +26 -26
- data/lib/dogapi/facade.rb +114 -3
- data/lib/dogapi/v1.rb +4 -0
- data/lib/dogapi/v1/aws_integration.rb +113 -0
- data/lib/dogapi/v1/aws_logs.rb +103 -0
- data/lib/dogapi/v1/azure_integration.rb +81 -0
- data/lib/dogapi/v1/gcp_integration.rb +72 -0
- data/lib/dogapi/v1/monitor.rb +14 -5
- data/lib/dogapi/version.rb +1 -1
- data/spec/integration/aws_integration_spec.rb +51 -0
- data/spec/integration/aws_logs_spec.rb +55 -0
- data/spec/integration/azure_integration_spec.rb +59 -0
- data/spec/integration/gcp_integration_spec.rb +53 -0
- data/spec/integration/monitor_spec.rb +15 -1
- data/spec/spec_helper.rb +17 -0
- data/spec/unit/common_spec.rb +14 -7
- metadata +15 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 721a223d2c8a3013933fd51f060f7964e5891e439f1c4fa535193fa78d3ddfa2
|
4
|
+
data.tar.gz: f4b2178af09e54b4fca2d89a572d75743bc44b6d47ab4d49c2a35b0c2bc23928
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 565c7bdb5c8374ed4434ed8c1b052109e2fdbb984869bb6d7292c6e3d2e348bf24e808ad9ce8011d7678963bdeb4966229fb75d864c67c6a6f575676545c6599
|
7
|
+
data.tar.gz: 54e106b35aed8c276bbfef782a4f5d820823beaffdff2f4a9976d84ffa6e156ec208f2826c966e0679248fbad802f470fba7c1320aff6af1a9c534ecac0dc5ef
|
data/.azure-pipelines/all.yml
CHANGED
@@ -15,9 +15,6 @@ jobs:
|
|
15
15
|
vmImage: "Ubuntu-16.04"
|
16
16
|
strategy:
|
17
17
|
matrix:
|
18
|
-
Rb23:
|
19
|
-
RUBY_VERSION: '2.3.7'
|
20
|
-
TASK: spec
|
21
18
|
Rb24:
|
22
19
|
RUBY_VERSION: '2.4.6'
|
23
20
|
TASK: spec
|
@@ -42,3 +39,12 @@ jobs:
|
|
42
39
|
displayName: 'bundle install'
|
43
40
|
- script: bundle exec rake $(TASK)
|
44
41
|
displayName: Run $(TASK) via bundle
|
42
|
+
- job: TestRuby19
|
43
|
+
pool:
|
44
|
+
vmImage: "Ubuntu-16.04"
|
45
|
+
steps:
|
46
|
+
# Until the `container` AZP resource supports being root in a container https://github.com/microsoft/azure-pipelines-agent/issues/2619 we need this long single line approach
|
47
|
+
# By default AZP clones the repo into a folder called `s` - https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops#checkout-path
|
48
|
+
# Mount this repo into the container, overwrite the Gemfile with the Ruby 1.9.3 supported depdencies, and run tests
|
49
|
+
- script: docker run -v $(Agent.BuildDirectory)/s:/cloned_repo corgibytes/ruby-1.9.3 bin/bash -c "cd cloned_repo; mv Gemfile_1.9 Gemfile; bundle install --retry=3 --jobs=4; bundle exec rake spec"
|
50
|
+
displayName: "Run tests with Ruby 1.9.3"
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2019-11-25 14:34:01 -0500 using RuboCop version 0.49.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -51,14 +51,14 @@ Layout/EmptyLines:
|
|
51
51
|
- 'lib/capistrano/datadog/v2.rb'
|
52
52
|
- 'lib/dogapi/facade.rb'
|
53
53
|
|
54
|
-
# Offense count:
|
54
|
+
# Offense count: 73
|
55
55
|
# Cop supports --auto-correct.
|
56
56
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
57
57
|
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
58
58
|
Layout/EmptyLinesAroundClassBody:
|
59
59
|
Enabled: false
|
60
60
|
|
61
|
-
# Offense count:
|
61
|
+
# Offense count: 4
|
62
62
|
# Cop supports --auto-correct.
|
63
63
|
Layout/EmptyLinesAroundMethodBody:
|
64
64
|
Exclude:
|
@@ -120,7 +120,7 @@ Layout/SpaceAfterComma:
|
|
120
120
|
Exclude:
|
121
121
|
- 'examples/custom_metric.rb'
|
122
122
|
|
123
|
-
# Offense count:
|
123
|
+
# Offense count: 83
|
124
124
|
# Cop supports --auto-correct.
|
125
125
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
126
126
|
# SupportedStyles: space, no_space
|
@@ -201,44 +201,47 @@ Lint/UselessAssignment:
|
|
201
201
|
Exclude:
|
202
202
|
- 'lib/capistrano/datadog.rb'
|
203
203
|
|
204
|
-
# Offense count:
|
204
|
+
# Offense count: 12
|
205
205
|
Metrics/AbcSize:
|
206
206
|
Max: 51
|
207
207
|
|
208
|
-
# Offense count:
|
208
|
+
# Offense count: 24
|
209
209
|
# Configuration parameters: CountComments, ExcludedMethods.
|
210
210
|
Metrics/BlockLength:
|
211
|
-
Max:
|
212
|
-
Exclude:
|
213
|
-
- 'spec/integration/monitor_spec.rb'
|
211
|
+
Max: 114
|
214
212
|
|
215
|
-
# Offense count:
|
213
|
+
# Offense count: 1
|
214
|
+
# Configuration parameters: CountComments.
|
215
|
+
Metrics/ClassLength:
|
216
|
+
Max: 105
|
217
|
+
|
218
|
+
# Offense count: 3
|
216
219
|
Metrics/CyclomaticComplexity:
|
217
220
|
Max: 8
|
218
221
|
|
219
|
-
# Offense count:
|
222
|
+
# Offense count: 17
|
220
223
|
# Configuration parameters: CountComments.
|
221
224
|
Metrics/MethodLength:
|
222
225
|
Max: 34
|
223
226
|
|
224
|
-
# Offense count:
|
227
|
+
# Offense count: 4
|
225
228
|
# Configuration parameters: CountKeywordArgs.
|
226
229
|
Metrics/ParameterLists:
|
227
230
|
Max: 7
|
228
231
|
|
229
|
-
# Offense count:
|
232
|
+
# Offense count: 2
|
230
233
|
Metrics/PerceivedComplexity:
|
231
234
|
Max: 9
|
232
235
|
|
233
|
-
# Offense count:
|
236
|
+
# Offense count: 13
|
234
237
|
Style/AccessorMethodName:
|
235
238
|
Exclude:
|
236
239
|
- 'lib/dogapi/facade.rb'
|
237
240
|
- 'lib/dogapi/v1/alert.rb'
|
238
241
|
- 'lib/dogapi/v1/dash.rb'
|
242
|
+
- 'lib/dogapi/v1/dashboard.rb'
|
239
243
|
- 'lib/dogapi/v1/embed.rb'
|
240
244
|
- 'lib/dogapi/v1/screenboard.rb'
|
241
|
-
- 'lib/dogapi/v1/dashboard.rb'
|
242
245
|
- 'lib/dogapi/v1/user.rb'
|
243
246
|
|
244
247
|
# Offense count: 1
|
@@ -283,7 +286,7 @@ Style/ClassMethods:
|
|
283
286
|
Exclude:
|
284
287
|
- 'lib/dogapi/common.rb'
|
285
288
|
|
286
|
-
# Offense count:
|
289
|
+
# Offense count: 3
|
287
290
|
Style/ClassVars:
|
288
291
|
Exclude:
|
289
292
|
- 'lib/dogapi/common.rb'
|
@@ -295,13 +298,12 @@ Style/ColonMethodCall:
|
|
295
298
|
- 'lib/capistrano/datadog.rb'
|
296
299
|
- 'lib/capistrano/datadog/v2.rb'
|
297
300
|
|
298
|
-
# Offense count:
|
301
|
+
# Offense count: 1
|
299
302
|
# Cop supports --auto-correct.
|
300
303
|
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerBackticks.
|
301
304
|
# SupportedStyles: backticks, percent_x, mixed
|
302
305
|
Style/CommandLiteral:
|
303
306
|
Exclude:
|
304
|
-
- 'lib/capistrano/datadog.rb'
|
305
307
|
- 'lib/dogapi/common.rb'
|
306
308
|
|
307
309
|
# Offense count: 1
|
@@ -312,7 +314,7 @@ Style/ConditionalAssignment:
|
|
312
314
|
Exclude:
|
313
315
|
- 'lib/capistrano/datadog.rb'
|
314
316
|
|
315
|
-
# Offense count:
|
317
|
+
# Offense count: 21
|
316
318
|
# Cop supports --auto-correct.
|
317
319
|
Style/DefWithParentheses:
|
318
320
|
Exclude:
|
@@ -322,28 +324,9 @@ Style/DefWithParentheses:
|
|
322
324
|
- 'lib/dogapi/v1/metric.rb'
|
323
325
|
- 'lib/dogapi/v1/screenboard.rb'
|
324
326
|
|
325
|
-
# Offense count:
|
327
|
+
# Offense count: 23
|
326
328
|
Style/Documentation:
|
327
|
-
|
328
|
-
- 'spec/**/*'
|
329
|
-
- 'test/**/*'
|
330
|
-
- 'lib/capistrano/datadog.rb'
|
331
|
-
- 'lib/capistrano/datadog/v2.rb'
|
332
|
-
- 'lib/capistrano/datadog/v3.rb'
|
333
|
-
- 'lib/dogapi/common.rb'
|
334
|
-
- 'lib/dogapi/v1/alert.rb'
|
335
|
-
- 'lib/dogapi/v1/comment.rb'
|
336
|
-
- 'lib/dogapi/v1/dash.rb'
|
337
|
-
- 'lib/dogapi/v1/metadata.rb'
|
338
|
-
- 'lib/dogapi/v1/monitor.rb'
|
339
|
-
- 'lib/dogapi/v1/screenboard.rb'
|
340
|
-
- 'lib/dogapi/v1/search.rb'
|
341
|
-
- 'lib/dogapi/v1/service_check.rb'
|
342
|
-
- 'lib/dogapi/v1/snapshot.rb'
|
343
|
-
- 'lib/dogapi/v1/user.rb'
|
344
|
-
- 'lib/dogapi/v1/integration.rb'
|
345
|
-
- 'lib/dogapi/v1/usage.rb'
|
346
|
-
- 'lib/dogapi/v1/metric.rb'
|
329
|
+
Enabled: false
|
347
330
|
|
348
331
|
# Offense count: 1
|
349
332
|
# Cop supports --auto-correct.
|
@@ -351,7 +334,7 @@ Style/EmptyLiteral:
|
|
351
334
|
Exclude:
|
352
335
|
- 'lib/dogapi/v1/metric.rb'
|
353
336
|
|
354
|
-
# Offense count:
|
337
|
+
# Offense count: 3
|
355
338
|
# Configuration parameters: MinBodyLength.
|
356
339
|
Style/GuardClause:
|
357
340
|
Exclude:
|
@@ -399,7 +382,7 @@ Style/LineEndConcatenation:
|
|
399
382
|
Exclude:
|
400
383
|
- 'dogapi.gemspec'
|
401
384
|
|
402
|
-
# Offense count:
|
385
|
+
# Offense count: 18
|
403
386
|
# Cop supports --auto-correct.
|
404
387
|
Style/MethodCallWithoutArgsParentheses:
|
405
388
|
Exclude:
|
@@ -414,7 +397,7 @@ Style/MultilineIfThen:
|
|
414
397
|
Exclude:
|
415
398
|
- 'lib/capistrano/datadog.rb'
|
416
399
|
|
417
|
-
# Offense count:
|
400
|
+
# Offense count: 29
|
418
401
|
# Cop supports --auto-correct.
|
419
402
|
Style/MutableConstant:
|
420
403
|
Enabled: false
|
@@ -434,12 +417,11 @@ Style/Not:
|
|
434
417
|
Exclude:
|
435
418
|
- 'lib/dogapi/v1/metric.rb'
|
436
419
|
|
437
|
-
# Offense count:
|
420
|
+
# Offense count: 4
|
438
421
|
# Cop supports --auto-correct.
|
439
422
|
# Configuration parameters: PreferredDelimiters.
|
440
423
|
Style/PercentLiteralDelimiters:
|
441
424
|
Exclude:
|
442
|
-
- 'lib/capistrano/datadog.rb'
|
443
425
|
- 'lib/dogapi/common.rb'
|
444
426
|
- 'spec/integration/event_spec.rb'
|
445
427
|
- 'spec/integration/monitor_spec.rb'
|
@@ -452,15 +434,14 @@ Style/PreferredHashMethods:
|
|
452
434
|
Exclude:
|
453
435
|
- 'lib/dogapi/common.rb'
|
454
436
|
|
455
|
-
# Offense count:
|
437
|
+
# Offense count: 2
|
456
438
|
# Cop supports --auto-correct.
|
457
439
|
Style/RedundantBegin:
|
458
440
|
Exclude:
|
459
441
|
- 'lib/capistrano/datadog.rb'
|
460
|
-
- 'lib/dogapi/common.rb'
|
461
442
|
- 'lib/dogapi/v1/metric.rb'
|
462
443
|
|
463
|
-
# Offense count:
|
444
|
+
# Offense count: 4
|
464
445
|
# Cop supports --auto-correct.
|
465
446
|
# Configuration parameters: AllowMultipleReturnValues.
|
466
447
|
Style/RedundantReturn:
|
@@ -497,7 +478,7 @@ Style/SpecialGlobalVars:
|
|
497
478
|
Exclude:
|
498
479
|
- 'dogapi.gemspec'
|
499
480
|
|
500
|
-
# Offense count:
|
481
|
+
# Offense count: 25
|
501
482
|
# Cop supports --auto-correct.
|
502
483
|
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
503
484
|
# SupportedStyles: single_quotes, double_quotes
|
@@ -509,8 +490,9 @@ Style/StringLiterals:
|
|
509
490
|
- 'examples/Capfile'
|
510
491
|
- 'examples/custom_event.rb'
|
511
492
|
- 'lib/dogapi/event.rb'
|
493
|
+
- 'lib/dogapi/v1/monitor.rb'
|
512
494
|
|
513
|
-
# Offense count:
|
495
|
+
# Offense count: 9
|
514
496
|
# Cop supports --auto-correct.
|
515
497
|
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
|
516
498
|
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
@@ -526,11 +508,11 @@ Style/TrailingCommaInLiteral:
|
|
526
508
|
|
527
509
|
# Offense count: 2
|
528
510
|
# Cop supports --auto-correct.
|
529
|
-
# Configuration parameters:
|
511
|
+
# Configuration parameters: SupportedStyles, WordRegex.
|
530
512
|
# SupportedStyles: percent, brackets
|
531
513
|
Style/WordArray:
|
532
|
-
|
533
|
-
|
514
|
+
EnforcedStyle: percent
|
515
|
+
MinSize: 3
|
534
516
|
|
535
517
|
# Offense count: 1
|
536
518
|
# Cop supports --auto-correct.
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## 1.38.0 / 2019-12-13
|
4
|
+
|
5
|
+
* [BUGFIX] Fix setting keys in both query params and headers. See [#194][]
|
6
|
+
* [BUGFIX] Fix `cancel_downtime_by_scope` method by setting `send_json` to `true`. See [#205][]
|
7
|
+
* [FEATURE] Add Azure, GCP, AWS, and AWS Logs integration support. See [#201][]
|
8
|
+
* [FEATURE] Add support for new `Monitor.can_delete` endpoint. See [#195][]
|
9
|
+
* [FEATURE] Add `options` to the `get_downtime` endpoint. See [#206][]
|
10
|
+
|
3
11
|
## 1.37.1 / 2019-11-04
|
4
12
|
|
5
13
|
* [BUGFIX] Revert the Service Level Objective feature to remove an issue with older versions of Ruby < 2.0. See [#198][]
|
@@ -261,7 +269,12 @@ This is the last release compatible with Ruby 1.8. ([EOL 2013-06-30](https://www
|
|
261
269
|
[#188]: https://github.com/DataDog/dogapi-rb/issues/188
|
262
270
|
[#189]: https://github.com/DataDog/dogapi-rb/issues/189
|
263
271
|
[#192]: https://github.com/DataDog/dogapi-rb/issues/192
|
272
|
+
[#194]: https://github.com/DataDog/dogapi-rb/issues/194
|
273
|
+
[#195]: https://github.com/DataDog/dogapi-rb/issues/195
|
264
274
|
[#198]: https://github.com/DataDog/dogapi-rb/issues/198
|
275
|
+
[#201]: https://github.com/DataDog/dogapi-rb/issues/201
|
276
|
+
[#205]: https://github.com/DataDog/dogapi-rb/issues/205
|
277
|
+
[#206]: https://github.com/DataDog/dogapi-rb/issues/206
|
265
278
|
[@ArjenSchwarz]: https://github.com/ArjenSchwarz
|
266
279
|
[@Kaixiang]: https://github.com/Kaixiang
|
267
280
|
[@TaylURRE]: https://github.com/TaylURRE
|
data/Gemfile_1.9
ADDED
data/lib/dogapi/common.rb
CHANGED
@@ -118,16 +118,8 @@ module Dogapi
|
|
118
118
|
resp = nil
|
119
119
|
connect do |conn|
|
120
120
|
begin
|
121
|
-
|
122
|
-
req = method
|
123
|
-
req['DD-API-KEY'] = @api_key
|
124
|
-
req['DD-APPLICATION-KEY'] = @application_key if with_app_key
|
125
|
-
|
126
|
-
if send_json
|
127
|
-
req.content_type = 'application/json'
|
128
|
-
req.body = MultiJson.dump(body)
|
129
|
-
end
|
130
|
-
|
121
|
+
params = prepare_params(extra_params, url, with_app_key)
|
122
|
+
req = prepare_request(method, url, params, body, send_json, with_app_key)
|
131
123
|
resp = conn.request(req)
|
132
124
|
return handle_response(resp)
|
133
125
|
rescue Exception => e
|
@@ -136,29 +128,37 @@ module Dogapi
|
|
136
128
|
end
|
137
129
|
end
|
138
130
|
|
139
|
-
def
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
def set_api_and_app_keys_in_params(url, with_app_key)
|
148
|
-
set_of_urls = Set.new ['/api/v1/series',
|
149
|
-
'/api/v1/check_run',
|
150
|
-
'/api/v1/events',
|
151
|
-
'/api/v1/screen']
|
131
|
+
def prepare_request(method, url, params, body, send_json, with_app_key)
|
132
|
+
url_with_params = url + params
|
133
|
+
req = method.new(url_with_params)
|
134
|
+
unless should_set_api_and_app_keys_in_params?(url)
|
135
|
+
req['DD-API-KEY'] = @api_key
|
136
|
+
req['DD-APPLICATION-KEY'] = @application_key if with_app_key
|
137
|
+
end
|
152
138
|
|
153
|
-
|
139
|
+
if send_json
|
140
|
+
req.content_type = 'application/json'
|
141
|
+
req.body = MultiJson.dump(body)
|
142
|
+
end
|
143
|
+
return req
|
144
|
+
end
|
154
145
|
|
155
|
-
|
146
|
+
def prepare_params(extra_params, url, with_app_key)
|
147
|
+
if should_set_api_and_app_keys_in_params?(url)
|
156
148
|
params = { api_key: @api_key }
|
157
149
|
params[:application_key] = @application_key if with_app_key
|
158
150
|
else
|
159
151
|
params = {}
|
160
152
|
end
|
161
|
-
|
153
|
+
params = extra_params.merge params unless extra_params.nil?
|
154
|
+
qs_params = params.map { |k, v| CGI.escape(k.to_s) + '=' + CGI.escape(v.to_s) }
|
155
|
+
qs = '?' + qs_params.join('&')
|
156
|
+
qs
|
157
|
+
end
|
158
|
+
|
159
|
+
def should_set_api_and_app_keys_in_params?(url)
|
160
|
+
set_of_urls = Set.new ['/api/v1/series', '/api/v1/check_run', '/api/v1/events', '/api/v1/screen']
|
161
|
+
return set_of_urls.include?(url)
|
162
162
|
end
|
163
163
|
|
164
164
|
def handle_response(resp)
|
data/lib/dogapi/facade.rb
CHANGED
@@ -59,6 +59,7 @@ module Dogapi
|
|
59
59
|
attr_accessor :v2
|
60
60
|
# Support for API version 2.
|
61
61
|
|
62
|
+
# rubocop:disable Metrics/MethodLength, Metrics/LineLength
|
62
63
|
def initialize(api_key, application_key=nil, host=nil, device=nil, silent=true, timeout=nil, endpoint=nil)
|
63
64
|
|
64
65
|
if api_key
|
@@ -94,12 +95,16 @@ module Dogapi
|
|
94
95
|
@legacy_event_svc = Dogapi::EventService.new(@datadog_host)
|
95
96
|
@hosts_svc = Dogapi::V1::HostsService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
96
97
|
@integration_svc = Dogapi::V1::IntegrationService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
98
|
+
@aws_integration_svc = Dogapi::V1::AwsIntegrationService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
99
|
+
@aws_logs_svc = Dogapi::V1::AwsLogsService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
97
100
|
@usage_svc = Dogapi::V1::UsageService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
98
|
-
|
101
|
+
@azure_integration_svc = Dogapi::V1::AzureIntegrationService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
102
|
+
@gcp_integration_svc = Dogapi::V1::GcpIntegrationService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
99
103
|
# Support for Dashboard List API v2.
|
100
104
|
@v2 = Dogapi::ClientV2.new(@api_key, @application_key, true, true, @datadog_host)
|
101
105
|
|
102
106
|
end
|
107
|
+
# rubocop:enable Metrics/MethodLength, Metrics/LineLength
|
103
108
|
|
104
109
|
#
|
105
110
|
# METRICS
|
@@ -536,6 +541,10 @@ module Dogapi
|
|
536
541
|
@monitor_svc.get_monitor(monitor_id, options)
|
537
542
|
end
|
538
543
|
|
544
|
+
def can_delete_monitors(monitor_ids)
|
545
|
+
@monitor_svc.can_delete_monitors(monitor_ids)
|
546
|
+
end
|
547
|
+
|
539
548
|
def delete_monitor(monitor_id)
|
540
549
|
@monitor_svc.delete_monitor(monitor_id)
|
541
550
|
end
|
@@ -588,8 +597,8 @@ module Dogapi
|
|
588
597
|
@monitor_svc.update_downtime(downtime_id, options)
|
589
598
|
end
|
590
599
|
|
591
|
-
def get_downtime(downtime_id)
|
592
|
-
@monitor_svc.get_downtime(downtime_id)
|
600
|
+
def get_downtime(downtime_id, options = {})
|
601
|
+
@monitor_svc.get_downtime(downtime_id, options)
|
593
602
|
end
|
594
603
|
|
595
604
|
def cancel_downtime(downtime_id)
|
@@ -682,6 +691,108 @@ module Dogapi
|
|
682
691
|
@integration_svc.delete_integration(source_type_name)
|
683
692
|
end
|
684
693
|
|
694
|
+
#
|
695
|
+
# AWS INTEGRATION
|
696
|
+
#
|
697
|
+
def aws_integration_list
|
698
|
+
@aws_integration_svc.aws_integration_list
|
699
|
+
end
|
700
|
+
|
701
|
+
def aws_integration_create(config)
|
702
|
+
@aws_integration_svc.aws_integration_create(config)
|
703
|
+
end
|
704
|
+
|
705
|
+
def aws_integration_delete(config)
|
706
|
+
@aws_integration_svc.aws_integration_delete(config)
|
707
|
+
end
|
708
|
+
|
709
|
+
def aws_integration_list_namespaces
|
710
|
+
@aws_integration_svc.aws_integration_list_namespaces
|
711
|
+
end
|
712
|
+
|
713
|
+
def aws_integration_generate_external_id(config)
|
714
|
+
@aws_integration_svc.aws_integration_generate_external_id(config)
|
715
|
+
end
|
716
|
+
|
717
|
+
def aws_integration_update(config, new_config)
|
718
|
+
@aws_integration_svc.aws_integration_update(config, new_config)
|
719
|
+
end
|
720
|
+
|
721
|
+
#
|
722
|
+
# AWS Logs Integration
|
723
|
+
#
|
724
|
+
|
725
|
+
def aws_logs_add_lambda(config)
|
726
|
+
@aws_logs_svc.aws_logs_add_lambda(config)
|
727
|
+
end
|
728
|
+
|
729
|
+
def aws_logs_list_services
|
730
|
+
@aws_logs_svc.aws_logs_list_services
|
731
|
+
end
|
732
|
+
|
733
|
+
def aws_logs_save_services(config)
|
734
|
+
@aws_logs_svc.aws_logs_save_services(config)
|
735
|
+
end
|
736
|
+
|
737
|
+
def aws_logs_integrations_list
|
738
|
+
@aws_logs_svc.aws_logs_integrations_list
|
739
|
+
end
|
740
|
+
|
741
|
+
def aws_logs_integration_delete(config)
|
742
|
+
@aws_logs_svc.aws_logs_integration_delete(config)
|
743
|
+
end
|
744
|
+
|
745
|
+
def aws_logs_check_lambda(config)
|
746
|
+
@aws_logs_svc.aws_logs_check_lambda(config)
|
747
|
+
end
|
748
|
+
|
749
|
+
def aws_logs_check_services(config)
|
750
|
+
@aws_logs_svc.aws_logs_check_services(config)
|
751
|
+
end
|
752
|
+
|
753
|
+
#
|
754
|
+
# AZURE INTEGRATION
|
755
|
+
#
|
756
|
+
|
757
|
+
def azure_integration_list
|
758
|
+
@azure_integration_svc.azure_integration_list
|
759
|
+
end
|
760
|
+
|
761
|
+
def azure_integration_create(config)
|
762
|
+
@azure_integration_svc.azure_integration_create(config)
|
763
|
+
end
|
764
|
+
|
765
|
+
def azure_integration_delete(config)
|
766
|
+
@azure_integration_svc.azure_integration_delete(config)
|
767
|
+
end
|
768
|
+
|
769
|
+
def azure_integration_update_host_filters(config)
|
770
|
+
@azure_integration_svc.azure_integration_update_host_filters(config)
|
771
|
+
end
|
772
|
+
|
773
|
+
def azure_integration_update(config)
|
774
|
+
@azure_integration_svc.azure_integration_update(config)
|
775
|
+
end
|
776
|
+
|
777
|
+
#
|
778
|
+
# GCP INTEGRATION
|
779
|
+
#
|
780
|
+
def gcp_integration_list
|
781
|
+
@gcp_integration_svc.gcp_integration_list
|
782
|
+
end
|
783
|
+
|
784
|
+
def gcp_integration_delete(config)
|
785
|
+
@gcp_integration_svc.gcp_integration_delete(config)
|
786
|
+
end
|
787
|
+
|
788
|
+
def gcp_integration_create(config)
|
789
|
+
@gcp_integration_svc.gcp_integration_create(config)
|
790
|
+
end
|
791
|
+
|
792
|
+
def gcp_integration_update(config)
|
793
|
+
@gcp_integration_svc.gcp_integration_update(config)
|
794
|
+
end
|
795
|
+
|
685
796
|
#
|
686
797
|
# USAGE
|
687
798
|
#
|