dogapi 1.38.0 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.azure-pipelines/all.yml +43 -12
- data/.github/CODEOWNERS +10 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +77 -0
- data/.github/labeler.yml +5 -0
- data/.github/workflows/labeler.yml +11 -0
- data/.github/workflows/stale.yml +39 -0
- data/.rubocop_todo.yml +30 -32
- data/CHANGELOG.md +28 -0
- data/CONTRIBUTING.md +111 -0
- data/DEVELOPMENT.md +11 -0
- data/Gemfile +1 -1
- data/Gemfile_1.9 +0 -1
- data/LICENSE +21 -20
- data/LICENSE-3rdparty.csv +6 -0
- data/README.rdoc +14 -0
- data/RELEASING.md +46 -0
- data/SUPPORT.md +9 -0
- data/dogapi.gemspec +2 -0
- data/examples/custom_metric.rb +1 -1
- data/lib/capistrano/README.md +4 -1
- data/lib/capistrano/datadog.rb +8 -4
- data/lib/capistrano/datadog/v2.rb +9 -1
- data/lib/capistrano/datadog/v3.rb +10 -1
- data/lib/dogapi.rb +4 -0
- data/lib/dogapi/common.rb +70 -12
- data/lib/dogapi/event.rb +4 -0
- data/lib/dogapi/facade.rb +99 -8
- data/lib/dogapi/metric.rb +4 -0
- data/lib/dogapi/v1.rb +6 -0
- data/lib/dogapi/v1/alert.rb +4 -0
- data/lib/dogapi/v1/aws_integration.rb +4 -0
- data/lib/dogapi/v1/aws_logs.rb +4 -0
- data/lib/dogapi/v1/azure_integration.rb +4 -0
- data/lib/dogapi/v1/comment.rb +4 -0
- data/lib/dogapi/v1/dash.rb +10 -4
- data/lib/dogapi/v1/dashboard.rb +16 -0
- data/lib/dogapi/v1/dashboard_list.rb +4 -0
- data/lib/dogapi/v1/embed.rb +4 -0
- data/lib/dogapi/v1/event.rb +4 -0
- data/lib/dogapi/v1/gcp_integration.rb +4 -0
- data/lib/dogapi/v1/hosts.rb +4 -0
- data/lib/dogapi/v1/integration.rb +4 -0
- data/lib/dogapi/v1/metadata.rb +4 -0
- data/lib/dogapi/v1/metric.rb +4 -0
- data/lib/dogapi/v1/monitor.rb +6 -2
- data/lib/dogapi/v1/screenboard.rb +4 -0
- data/lib/dogapi/v1/search.rb +4 -0
- data/lib/dogapi/v1/service_check.rb +4 -0
- data/lib/dogapi/v1/service_level_objective.rb +113 -0
- data/lib/dogapi/v1/snapshot.rb +4 -0
- data/lib/dogapi/v1/synthetics.rb +80 -0
- data/lib/dogapi/v1/tag.rb +4 -0
- data/lib/dogapi/v1/usage.rb +4 -0
- data/lib/dogapi/v1/user.rb +4 -0
- data/lib/dogapi/v2.rb +4 -0
- data/lib/dogapi/v2/dashboard_list.rb +4 -0
- data/lib/dogapi/version.rb +5 -1
- data/spec/integration/alert_spec.rb +4 -0
- data/spec/integration/aws_integration_spec.rb +4 -0
- data/spec/integration/aws_logs_spec.rb +4 -0
- data/spec/integration/azure_integration_spec.rb +4 -0
- data/spec/integration/comment_spec.rb +5 -0
- data/spec/integration/common_spec.rb +4 -0
- data/spec/integration/dash_spec.rb +7 -1
- data/spec/integration/dashboard_list_spec.rb +4 -0
- data/spec/integration/dashboard_spec.rb +15 -1
- data/spec/integration/embed_spec.rb +4 -0
- data/spec/integration/event_spec.rb +5 -0
- data/spec/integration/gcp_integration_spec.rb +4 -0
- data/spec/integration/integration_spec.rb +4 -0
- data/spec/integration/metadata_spec.rb +4 -0
- data/spec/integration/metric_spec.rb +4 -0
- data/spec/integration/monitor_spec.rb +15 -0
- data/spec/integration/screenboard_spec.rb +4 -0
- data/spec/integration/search_spec.rb +4 -0
- data/spec/integration/service_check_spec.rb +4 -0
- data/spec/integration/service_level_objective_spec.rb +73 -0
- data/spec/integration/snapshot_spec.rb +4 -0
- data/spec/integration/synthetics_spec.rb +131 -0
- data/spec/integration/tag_spec.rb +4 -0
- data/spec/integration/usage_spec.rb +4 -0
- data/spec/integration/user_spec.rb +4 -0
- data/spec/spec_helper.rb +17 -1
- data/spec/unit/capistrano_spec.rb +4 -0
- data/spec/unit/common_spec.rb +50 -0
- data/spec/unit/facade_spec.rb +4 -0
- metadata +24 -7
data/lib/dogapi/event.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'net/http'
|
2
6
|
|
3
7
|
require 'rubygems'
|
data/lib/dogapi/facade.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'time'
|
2
6
|
require 'dogapi/v1'
|
3
7
|
require 'dogapi/v2'
|
@@ -90,6 +94,7 @@ module Dogapi
|
|
90
94
|
@embed_svc = Dogapi::V1::EmbedService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
91
95
|
@screenboard_svc = Dogapi::V1::ScreenboardService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
92
96
|
@monitor_svc = Dogapi::V1::MonitorService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
97
|
+
@synthetics_svc = Dogapi::V1::SyntheticsService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
93
98
|
@service_check_svc = Dogapi::V1::ServiceCheckService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
94
99
|
@metadata_svc = Dogapi::V1::MetadataService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
95
100
|
@legacy_event_svc = Dogapi::EventService.new(@datadog_host)
|
@@ -100,6 +105,9 @@ module Dogapi
|
|
100
105
|
@usage_svc = Dogapi::V1::UsageService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
101
106
|
@azure_integration_svc = Dogapi::V1::AzureIntegrationService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
102
107
|
@gcp_integration_svc = Dogapi::V1::GcpIntegrationService.new(@api_key, @application_key, silent, timeout, @datadog_host)
|
108
|
+
@service_level_objective_svc = Dogapi::V1::ServiceLevelObjectiveService.new(@api_key, @application_key, silent,
|
109
|
+
timeout, @datadog_host)
|
110
|
+
|
103
111
|
# Support for Dashboard List API v2.
|
104
112
|
@v2 = Dogapi::ClientV2.new(@api_key, @application_key, true, true, @datadog_host)
|
105
113
|
|
@@ -117,7 +125,7 @@ module Dogapi
|
|
117
125
|
# :device => String
|
118
126
|
# :options => Map
|
119
127
|
#
|
120
|
-
# options[:type] = "
|
128
|
+
# options[:type] = "count" to specify a counter metric
|
121
129
|
# options[:tags] = ["tag1", "tag2"] to tag the point
|
122
130
|
def emit_point(metric, value, options= {})
|
123
131
|
defaults = { :timestamp => Time.now }
|
@@ -139,7 +147,7 @@ module Dogapi
|
|
139
147
|
# :device => String
|
140
148
|
# :options => Map
|
141
149
|
#
|
142
|
-
# options[:type] = "
|
150
|
+
# options[:type] = "count" to specify a counter metric
|
143
151
|
# options[:tags] = ["tag1", "tag2"] to tag the point
|
144
152
|
def emit_points(metric, points, options= {})
|
145
153
|
scope = override_scope options
|
@@ -316,13 +324,13 @@ module Dogapi
|
|
316
324
|
#
|
317
325
|
|
318
326
|
# Create a dashboard.
|
319
|
-
def create_dashboard(title, description, graphs, template_variables=nil)
|
320
|
-
@dash_service.create_dashboard(title, description, graphs, template_variables)
|
327
|
+
def create_dashboard(title, description, graphs, template_variables = nil, read_only = false)
|
328
|
+
@dash_service.create_dashboard(title, description, graphs, template_variables, read_only)
|
321
329
|
end
|
322
330
|
|
323
331
|
# Update a dashboard.
|
324
|
-
def update_dashboard(dash_id, title, description, graphs, template_variables=nil)
|
325
|
-
@dash_service.update_dashboard(dash_id, title, description, graphs, template_variables)
|
332
|
+
def update_dashboard(dash_id, title, description, graphs, template_variables = nil, read_only = false)
|
333
|
+
@dash_service.update_dashboard(dash_id, title, description, graphs, template_variables, read_only)
|
326
334
|
end
|
327
335
|
|
328
336
|
# Fetch the given dashboard.
|
@@ -525,6 +533,49 @@ module Dogapi
|
|
525
533
|
@screenboard_svc.revoke_screenboard(board_id)
|
526
534
|
end
|
527
535
|
|
536
|
+
#
|
537
|
+
# SYNTHETICS
|
538
|
+
#
|
539
|
+
def create_synthetics_test(type, config, options = {})
|
540
|
+
@synthetics_svc.create_synthetics_test(type, config, options)
|
541
|
+
end
|
542
|
+
|
543
|
+
def update_synthetics_test(test_id, type, config, options = {})
|
544
|
+
@synthetics_svc.update_synthetics_test(test_id, type, config, options)
|
545
|
+
end
|
546
|
+
|
547
|
+
def delete_synthetics_tests(test_ids)
|
548
|
+
@synthetics_svc.delete_synthetics_tests(test_ids)
|
549
|
+
end
|
550
|
+
|
551
|
+
def start_pause_synthetics_test(test_id, new_status)
|
552
|
+
@synthetics_svc.start_pause_synthetics_test(test_id, new_status)
|
553
|
+
end
|
554
|
+
|
555
|
+
def get_all_synthetics_tests
|
556
|
+
@synthetics_svc.get_all_synthetics_tests()
|
557
|
+
end
|
558
|
+
|
559
|
+
def get_synthetics_test(test_id)
|
560
|
+
@synthetics_svc.get_synthetics_test(test_id)
|
561
|
+
end
|
562
|
+
|
563
|
+
def get_synthetics_results(test_id)
|
564
|
+
@synthetics_svc.get_synthetics_results(test_id)
|
565
|
+
end
|
566
|
+
|
567
|
+
def get_synthetics_result(test_id, result_id)
|
568
|
+
@synthetics_svc.get_synthetics_result(test_id, result_id)
|
569
|
+
end
|
570
|
+
|
571
|
+
def get_synthetics_devices
|
572
|
+
@synthetics_svc.get_synthetics_devices()
|
573
|
+
end
|
574
|
+
|
575
|
+
def get_synthetics_locations
|
576
|
+
@synthetics_svc.get_synthetics_locations()
|
577
|
+
end
|
578
|
+
|
528
579
|
#
|
529
580
|
# MONITORS
|
530
581
|
#
|
@@ -545,8 +596,8 @@ module Dogapi
|
|
545
596
|
@monitor_svc.can_delete_monitors(monitor_ids)
|
546
597
|
end
|
547
598
|
|
548
|
-
def delete_monitor(monitor_id)
|
549
|
-
@monitor_svc.delete_monitor(monitor_id)
|
599
|
+
def delete_monitor(monitor_id, options = {})
|
600
|
+
@monitor_svc.delete_monitor(monitor_id, options)
|
550
601
|
end
|
551
602
|
|
552
603
|
def get_all_monitors(options= {})
|
@@ -625,6 +676,46 @@ module Dogapi
|
|
625
676
|
@monitor_svc.unmute_host(hostname)
|
626
677
|
end
|
627
678
|
|
679
|
+
#
|
680
|
+
# SERVICE LEVEL OBJECTIVES
|
681
|
+
#
|
682
|
+
|
683
|
+
def create_service_level_objective(type, slo_name, thresholds, options = {})
|
684
|
+
@service_level_objective_svc.create_service_level_objective(type, slo_name, thresholds, options)
|
685
|
+
end
|
686
|
+
|
687
|
+
def update_service_level_objective(slo_id, type, options = {})
|
688
|
+
@service_level_objective_svc.update_service_level_objective(slo_id, type, options)
|
689
|
+
end
|
690
|
+
|
691
|
+
def get_service_level_objective(slo_id)
|
692
|
+
@service_level_objective_svc.get_service_level_objective(slo_id)
|
693
|
+
end
|
694
|
+
|
695
|
+
def get_service_level_objective_history(slo_id, from_ts, to_ts)
|
696
|
+
@service_level_objective_svc.get_service_level_objective_history(slo_id, from_ts, to_ts)
|
697
|
+
end
|
698
|
+
|
699
|
+
def search_service_level_objective(slo_ids = nil, query = nil, offset = nil, limit = nil)
|
700
|
+
@service_level_objective_svc.search_service_level_objective(slo_ids, query, offset, limit)
|
701
|
+
end
|
702
|
+
|
703
|
+
def can_delete_service_level_objective(slo_ids)
|
704
|
+
@service_level_objective_svc.can_delete_service_level_objective(slo_ids)
|
705
|
+
end
|
706
|
+
|
707
|
+
def delete_service_level_objective(slo_id)
|
708
|
+
@service_level_objective_svc.delete_service_level_objective(slo_id)
|
709
|
+
end
|
710
|
+
|
711
|
+
def delete_many_service_level_objective(slo_ids)
|
712
|
+
@service_level_objective_svc.delete_many_service_level_objective(slo_ids)
|
713
|
+
end
|
714
|
+
|
715
|
+
def delete_timeframes_service_level_objective(ops)
|
716
|
+
@service_level_objective_svc.delete_timeframes_service_level_objective(ops)
|
717
|
+
end
|
718
|
+
|
628
719
|
#
|
629
720
|
# SERVICE CHECKS
|
630
721
|
#
|
data/lib/dogapi/metric.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'net/http'
|
2
6
|
|
3
7
|
require 'rubygems'
|
data/lib/dogapi/v1.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi/v1/alert'
|
2
6
|
require 'dogapi/v1/comment'
|
3
7
|
require 'dogapi/v1/dash'
|
@@ -11,7 +15,9 @@ require 'dogapi/v1/monitor'
|
|
11
15
|
require 'dogapi/v1/screenboard'
|
12
16
|
require 'dogapi/v1/search'
|
13
17
|
require 'dogapi/v1/service_check'
|
18
|
+
require 'dogapi/v1/service_level_objective'
|
14
19
|
require 'dogapi/v1/snapshot'
|
20
|
+
require 'dogapi/v1/synthetics'
|
15
21
|
require 'dogapi/v1/tag'
|
16
22
|
require 'dogapi/v1/user'
|
17
23
|
require 'dogapi/v1/hosts'
|
data/lib/dogapi/v1/alert.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/aws_logs.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/comment.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/dash.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -7,23 +11,25 @@ module Dogapi
|
|
7
11
|
|
8
12
|
API_VERSION = 'v1'
|
9
13
|
|
10
|
-
def create_dashboard(title, description, graphs, template_variables = nil)
|
14
|
+
def create_dashboard(title, description, graphs, template_variables = nil, read_only = false)
|
11
15
|
body = {
|
12
16
|
:title => title,
|
13
17
|
:description => description,
|
14
18
|
:graphs => graphs,
|
15
|
-
:template_variables => (template_variables or [])
|
19
|
+
:template_variables => (template_variables or []),
|
20
|
+
:read_only => read_only
|
16
21
|
}
|
17
22
|
|
18
23
|
request(Net::HTTP::Post, "/api/#{API_VERSION}/dash", nil, body, true)
|
19
24
|
end
|
20
25
|
|
21
|
-
def update_dashboard(dash_id, title, description, graphs, template_variables=nil)
|
26
|
+
def update_dashboard(dash_id, title, description, graphs, template_variables = nil, read_only = false)
|
22
27
|
body = {
|
23
28
|
:title => title,
|
24
29
|
:description => description,
|
25
30
|
:graphs => graphs,
|
26
|
-
:template_variables => (template_variables or [])
|
31
|
+
:template_variables => (template_variables or []),
|
32
|
+
:read_only => read_only
|
27
33
|
}
|
28
34
|
|
29
35
|
request(Net::HTTP::Put, "/api/#{API_VERSION}/dash/#{dash_id}", nil, body, true)
|
data/lib/dogapi/v1/dashboard.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -24,6 +28,11 @@ module Dogapi
|
|
24
28
|
# e.g. '["user1@domain.com", "user2@domain.com"]'
|
25
29
|
# :template_variables => JSON: List of template variables for this dashboard.
|
26
30
|
# e.g. [{"name": "host", "prefix": "host", "default": "my-host"}]
|
31
|
+
# :template_variable_presets => JSON: List of template variables saved views
|
32
|
+
# e.g. {
|
33
|
+
# "name": "my_template_variable_preset",
|
34
|
+
# "template_variables": [{"name": "host", "prefix": "host", "default": "my-host"}]
|
35
|
+
# }
|
27
36
|
def create_board(title, widgets, layout_type, options)
|
28
37
|
# Required arguments
|
29
38
|
body = {
|
@@ -36,6 +45,7 @@ module Dogapi
|
|
36
45
|
body[:is_read_only] = options[:is_read_only] if options[:is_read_only]
|
37
46
|
body[:notify_list] = options[:notify_list] if options[:notify_list]
|
38
47
|
body[:template_variables] = options[:template_variables] if options[:template_variables]
|
48
|
+
body[:template_variable_presets] = options[:template_variable_presets] if options[:template_variable_presets]
|
39
49
|
|
40
50
|
request(Net::HTTP::Post, "/api/#{API_VERSION}/#{RESOURCE_NAME}", nil, body, true)
|
41
51
|
end
|
@@ -56,6 +66,11 @@ module Dogapi
|
|
56
66
|
# e.g. '["user1@domain.com", "user2@domain.com"]'
|
57
67
|
# :template_variables => JSON: List of template variables for this dashboard.
|
58
68
|
# e.g. [{"name": "host", "prefix": "host", "default": "my-host"}]
|
69
|
+
# :template_variable_presets => JSON: List of template variables saved views
|
70
|
+
# e.g. {
|
71
|
+
# "name": "my_template_variable_preset",
|
72
|
+
# "template_variables": [{"name": "host", "prefix": "host", "default": "my-host"}]
|
73
|
+
# }
|
59
74
|
def update_board(dashboard_id, title, widgets, layout_type, options)
|
60
75
|
# Required arguments
|
61
76
|
body = {
|
@@ -68,6 +83,7 @@ module Dogapi
|
|
68
83
|
body[:is_read_only] = options[:is_read_only] if options[:is_read_only]
|
69
84
|
body[:notify_list] = options[:notify_list] if options[:notify_list]
|
70
85
|
body[:template_variables] = options[:template_variables] if options[:template_variables]
|
86
|
+
body[:template_variable_presets] = options[:template_variable_presets] if options[:template_variable_presets]
|
71
87
|
|
72
88
|
request(Net::HTTP::Put, "/api/#{API_VERSION}/#{RESOURCE_NAME}/#{dashboard_id}", nil, body, true)
|
73
89
|
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/embed.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/event.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/hosts.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/metadata.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/metric.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/monitor.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -51,8 +55,8 @@ module Dogapi
|
|
51
55
|
request(Net::HTTP::Get, "/api/#{API_VERSION}/monitor/can_delete", extra_params, nil, false)
|
52
56
|
end
|
53
57
|
|
54
|
-
def delete_monitor(monitor_id)
|
55
|
-
request(Net::HTTP::Delete, "/api/#{API_VERSION}/monitor/#{monitor_id}",
|
58
|
+
def delete_monitor(monitor_id, options = {})
|
59
|
+
request(Net::HTTP::Delete, "/api/#{API_VERSION}/monitor/#{monitor_id}", options, nil, false)
|
56
60
|
end
|
57
61
|
|
58
62
|
def get_all_monitors(options = {})
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
data/lib/dogapi/v1/search.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
|
2
|
+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
|
3
|
+
# Copyright 2011-Present Datadog, Inc.
|
4
|
+
|
1
5
|
require 'dogapi'
|
2
6
|
|
3
7
|
module Dogapi
|