dogapi-demo 0.1.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 +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.tailor +106 -0
- data/.travis.yml +8 -0
- data/CHANGELOG.md +157 -0
- data/Gemfile +16 -0
- data/LICENSE +25 -0
- data/README.rdoc +143 -0
- data/Rakefile +50 -0
- data/dogapi-demo.gemspec +32 -0
- data/examples/Capfile +19 -0
- data/examples/custom_event.rb +37 -0
- data/examples/custom_metric.rb +35 -0
- data/lib/capistrano/README.md +13 -0
- data/lib/capistrano/datadog.rb +125 -0
- data/lib/capistrano/datadog/v2.rb +74 -0
- data/lib/capistrano/datadog/v3.rb +64 -0
- data/lib/dogapi-demo.rb +5 -0
- data/lib/dogapi-demo/common.rb +168 -0
- data/lib/dogapi-demo/event.rb +129 -0
- data/lib/dogapi-demo/facade.rb +475 -0
- data/lib/dogapi-demo/metric.rb +34 -0
- data/lib/dogapi-demo/v1.rb +13 -0
- data/lib/dogapi-demo/v1/alert.rb +112 -0
- data/lib/dogapi-demo/v1/comment.rb +62 -0
- data/lib/dogapi-demo/v1/dash.rb +94 -0
- data/lib/dogapi-demo/v1/embed.rb +106 -0
- data/lib/dogapi-demo/v1/event.rb +101 -0
- data/lib/dogapi-demo/v1/metric.rb +118 -0
- data/lib/dogapi-demo/v1/monitor.rb +264 -0
- data/lib/dogapi-demo/v1/screenboard.rb +110 -0
- data/lib/dogapi-demo/v1/search.rb +27 -0
- data/lib/dogapi-demo/v1/service_check.rb +32 -0
- data/lib/dogapi-demo/v1/snapshot.rb +30 -0
- data/lib/dogapi-demo/v1/tag.rb +141 -0
- data/lib/dogapi-demo/v1/user.rb +113 -0
- data/lib/dogapi-demo/version.rb +3 -0
- data/spec/alerts_spec.rb +33 -0
- data/spec/common_spec.rb +37 -0
- data/spec/facade_spec.rb +166 -0
- data/spec/spec_helper.rb +30 -0
- data/spec/support/cassettes/Alerts/create/returns_HTTP_code_200.yml +114 -0
- data/spec/support/cassettes/Alerts/create/returns_a_valid_event_ID.yml +114 -0
- data/spec/support/cassettes/Alerts/create/returns_the_same_query_as_sent.yml +114 -0
- data/spec/support/cassettes/Facade/Events/emits_aggregate_events.yml +193 -0
- data/spec/support/cassettes/Facade/Events/emits_events_and_retrieves_them.yml +100 -0
- data/spec/support/cassettes/Facade/Events/emits_events_with_specified_priority.yml +98 -0
- data/spec/support/cassettes/Facade/Tags/adds_updates_and_detaches_tags.yml +442 -0
- data/tests/test_alerts.rb +38 -0
- data/tests/test_base.rb +30 -0
- data/tests/test_client.rb +23 -0
- data/tests/test_comments.rb +39 -0
- data/tests/test_dashes.rb +85 -0
- data/tests/test_embed.rb +194 -0
- data/tests/test_monitors.rb +192 -0
- data/tests/test_screenboard.rb +90 -0
- data/tests/test_search.rb +20 -0
- data/tests/test_snapshot.rb +28 -0
- data/tests/test_users.rb +65 -0
- metadata +178 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'vcr'
|
3
|
+
|
4
|
+
# include our code and methods
|
5
|
+
require 'dogapi'
|
6
|
+
|
7
|
+
# Load any custom matchers
|
8
|
+
Dir[File.join(File.dirname(__FILE__), "/support/**/*.rb")].each { |f| require f }
|
9
|
+
|
10
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
11
|
+
RSpec.configure do |config|
|
12
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
13
|
+
config.run_all_when_everything_filtered = true
|
14
|
+
config.filter_run :focus
|
15
|
+
|
16
|
+
# Run specs in random order to surface order dependencies. If you find an
|
17
|
+
# order dependency and want to debug it, you can fix the order by providing
|
18
|
+
# the seed, which is printed after each run.
|
19
|
+
# --seed 1234
|
20
|
+
config.order = 'random'
|
21
|
+
end
|
22
|
+
|
23
|
+
VCR.configure do |c|
|
24
|
+
c.cassette_library_dir = 'spec/support/cassettes'
|
25
|
+
c.configure_rspec_metadata!
|
26
|
+
c.default_cassette_options = { :record => :new_episodes, :re_record_interval => 7776000 } # 90 days, in seconds
|
27
|
+
c.hook_into :webmock
|
28
|
+
c.filter_sensitive_data('<DATADOG_API_KEY>') { ENV["DATADOG_API_KEY"] }
|
29
|
+
c.filter_sensitive_data('<DATADOG_APP_KEY>') { ENV["DATADOG_APP_KEY"] }
|
30
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/alert?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
9
|
+
> 5"}'
|
10
|
+
headers:
|
11
|
+
Accept-Encoding:
|
12
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
13
|
+
Accept:
|
14
|
+
- "*/*"
|
15
|
+
User-Agent:
|
16
|
+
- Ruby
|
17
|
+
Content-Type:
|
18
|
+
- application/json
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Cache-Control:
|
25
|
+
- no-cache
|
26
|
+
Content-Type:
|
27
|
+
- application/json; charset=utf-8
|
28
|
+
Date:
|
29
|
+
- Mon, 11 Apr 2016 17:56:53 GMT
|
30
|
+
Dd-Pool:
|
31
|
+
- dogweb_sameorig
|
32
|
+
Pragma:
|
33
|
+
- no-cache
|
34
|
+
Set-Cookie:
|
35
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:53 GMT"; Max-Age=604800; Path=/
|
36
|
+
Strict-Transport-Security:
|
37
|
+
- max-age=15724800;
|
38
|
+
Vary:
|
39
|
+
- Accept-Encoding
|
40
|
+
X-Content-Type-Options:
|
41
|
+
- nosniff
|
42
|
+
X-Dd-Debug:
|
43
|
+
- ODPlWrOS4MEcZXXD/7SPngU2RDdboMc4yDiHiqJBZz0=
|
44
|
+
X-Dd-Version:
|
45
|
+
- '33.3404'
|
46
|
+
X-Frame-Options:
|
47
|
+
- SAMEORIGIN
|
48
|
+
Content-Length:
|
49
|
+
- '298'
|
50
|
+
Connection:
|
51
|
+
- keep-alive
|
52
|
+
body:
|
53
|
+
encoding: UTF-8
|
54
|
+
string: '{"event_object":"8ee60aa761d2c9f71a2c1ba4979a0363","notify_audit":true,"timeout_h":null,"silenced":false,"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
55
|
+
> 5","message":"","id":552995,"name":"**test.metric.metric** over **host:test.metric.host**
|
56
|
+
was **> 5.0** on average during the **last 10m**.","no_data_timeframe":false,"creator":2575,"notify_no_data":false,"renotify_interval":null,"state":"No
|
57
|
+
Data","escalation_message":"","silenced_timeout_ts":null}'
|
58
|
+
http_version:
|
59
|
+
recorded_at: Mon, 11 Apr 2016 17:56:53 GMT
|
60
|
+
- request:
|
61
|
+
method: delete
|
62
|
+
uri: https://app.datadoghq.com/api/v1/alert/552995?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
63
|
+
body:
|
64
|
+
encoding: US-ASCII
|
65
|
+
string: ''
|
66
|
+
headers:
|
67
|
+
Accept-Encoding:
|
68
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
69
|
+
Accept:
|
70
|
+
- "*/*"
|
71
|
+
User-Agent:
|
72
|
+
- Ruby
|
73
|
+
response:
|
74
|
+
status:
|
75
|
+
code: 200
|
76
|
+
message: OK
|
77
|
+
headers:
|
78
|
+
Cache-Control:
|
79
|
+
- no-cache
|
80
|
+
Content-Type:
|
81
|
+
- application/json; charset=utf-8
|
82
|
+
Date:
|
83
|
+
- Mon, 11 Apr 2016 17:56:53 GMT
|
84
|
+
Dd-Pool:
|
85
|
+
- dogweb_sameorig
|
86
|
+
Pragma:
|
87
|
+
- no-cache
|
88
|
+
Set-Cookie:
|
89
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:53 GMT"; Max-Age=604800; Path=/
|
90
|
+
Strict-Transport-Security:
|
91
|
+
- max-age=15724800;
|
92
|
+
Vary:
|
93
|
+
- Accept-Encoding
|
94
|
+
X-Content-Type-Options:
|
95
|
+
- nosniff
|
96
|
+
X-Dd-Debug:
|
97
|
+
- avwu1L56XulIB/cxbiNxDBj6ZA7aKJvxR5yfoq2OTaw=
|
98
|
+
X-Dd-Version:
|
99
|
+
- '33.3404'
|
100
|
+
X-Frame-Options:
|
101
|
+
- SAMEORIGIN
|
102
|
+
Content-Length:
|
103
|
+
- '288'
|
104
|
+
Connection:
|
105
|
+
- keep-alive
|
106
|
+
body:
|
107
|
+
encoding: UTF-8
|
108
|
+
string: '{"event_object":"8ee60aa761d2c9f71a2c1ba4979a0363","notify_audit":true,"timeout_h":null,"silenced":false,"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
109
|
+
> 5","message":"","name":"**test.metric.metric** over **host:test.metric.host**
|
110
|
+
was **> 5.0** on average during the **last 10m**.","no_data_timeframe":false,"creator":2575,"notify_no_data":false,"renotify_interval":null,"state":"No
|
111
|
+
Data","escalation_message":"","silenced_timeout_ts":null}'
|
112
|
+
http_version:
|
113
|
+
recorded_at: Mon, 11 Apr 2016 17:56:53 GMT
|
114
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,114 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/alert?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
9
|
+
> 5"}'
|
10
|
+
headers:
|
11
|
+
Accept-Encoding:
|
12
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
13
|
+
Accept:
|
14
|
+
- "*/*"
|
15
|
+
User-Agent:
|
16
|
+
- Ruby
|
17
|
+
Content-Type:
|
18
|
+
- application/json
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Cache-Control:
|
25
|
+
- no-cache
|
26
|
+
Content-Type:
|
27
|
+
- application/json; charset=utf-8
|
28
|
+
Date:
|
29
|
+
- Mon, 11 Apr 2016 17:56:52 GMT
|
30
|
+
Dd-Pool:
|
31
|
+
- dogweb_sameorig
|
32
|
+
Pragma:
|
33
|
+
- no-cache
|
34
|
+
Set-Cookie:
|
35
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:52 GMT"; Max-Age=604800; Path=/
|
36
|
+
Strict-Transport-Security:
|
37
|
+
- max-age=15724800;
|
38
|
+
Vary:
|
39
|
+
- Accept-Encoding
|
40
|
+
X-Content-Type-Options:
|
41
|
+
- nosniff
|
42
|
+
X-Dd-Debug:
|
43
|
+
- omuZE5ldmS3gykYWzeRNmM1P8lUKatqFhRFlclaYIlg=
|
44
|
+
X-Dd-Version:
|
45
|
+
- '33.3404'
|
46
|
+
X-Frame-Options:
|
47
|
+
- SAMEORIGIN
|
48
|
+
Content-Length:
|
49
|
+
- '297'
|
50
|
+
Connection:
|
51
|
+
- keep-alive
|
52
|
+
body:
|
53
|
+
encoding: UTF-8
|
54
|
+
string: '{"event_object":"8ee60aa761d2c9f71a2c1ba4979a0363","notify_audit":true,"timeout_h":null,"silenced":false,"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
55
|
+
> 5","message":"","id":552994,"name":"**test.metric.metric** over **host:test.metric.host**
|
56
|
+
was **> 5.0** on average during the **last 10m**.","no_data_timeframe":false,"creator":2575,"notify_no_data":false,"renotify_interval":null,"state":"No
|
57
|
+
Data","escalation_message":"","silenced_timeout_ts":null}'
|
58
|
+
http_version:
|
59
|
+
recorded_at: Mon, 11 Apr 2016 17:56:52 GMT
|
60
|
+
- request:
|
61
|
+
method: delete
|
62
|
+
uri: https://app.datadoghq.com/api/v1/alert/552994?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
63
|
+
body:
|
64
|
+
encoding: US-ASCII
|
65
|
+
string: ''
|
66
|
+
headers:
|
67
|
+
Accept-Encoding:
|
68
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
69
|
+
Accept:
|
70
|
+
- "*/*"
|
71
|
+
User-Agent:
|
72
|
+
- Ruby
|
73
|
+
response:
|
74
|
+
status:
|
75
|
+
code: 200
|
76
|
+
message: OK
|
77
|
+
headers:
|
78
|
+
Cache-Control:
|
79
|
+
- no-cache
|
80
|
+
Content-Type:
|
81
|
+
- application/json; charset=utf-8
|
82
|
+
Date:
|
83
|
+
- Mon, 11 Apr 2016 17:56:53 GMT
|
84
|
+
Dd-Pool:
|
85
|
+
- dogweb_sameorig
|
86
|
+
Pragma:
|
87
|
+
- no-cache
|
88
|
+
Set-Cookie:
|
89
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:52 GMT"; Max-Age=604800; Path=/
|
90
|
+
Strict-Transport-Security:
|
91
|
+
- max-age=15724800;
|
92
|
+
Vary:
|
93
|
+
- Accept-Encoding
|
94
|
+
X-Content-Type-Options:
|
95
|
+
- nosniff
|
96
|
+
X-Dd-Debug:
|
97
|
+
- Bj/SqNU1vbZGxNGffIRtmaWe7MKGSPoKHC3+ZhLAjqk=
|
98
|
+
X-Dd-Version:
|
99
|
+
- '33.3404'
|
100
|
+
X-Frame-Options:
|
101
|
+
- SAMEORIGIN
|
102
|
+
Content-Length:
|
103
|
+
- '288'
|
104
|
+
Connection:
|
105
|
+
- keep-alive
|
106
|
+
body:
|
107
|
+
encoding: UTF-8
|
108
|
+
string: '{"event_object":"8ee60aa761d2c9f71a2c1ba4979a0363","notify_audit":true,"timeout_h":null,"silenced":false,"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
109
|
+
> 5","message":"","name":"**test.metric.metric** over **host:test.metric.host**
|
110
|
+
was **> 5.0** on average during the **last 10m**.","no_data_timeframe":false,"creator":2575,"notify_no_data":false,"renotify_interval":null,"state":"No
|
111
|
+
Data","escalation_message":"","silenced_timeout_ts":null}'
|
112
|
+
http_version:
|
113
|
+
recorded_at: Mon, 11 Apr 2016 17:56:53 GMT
|
114
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,114 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/alert?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
9
|
+
> 5"}'
|
10
|
+
headers:
|
11
|
+
Accept-Encoding:
|
12
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
13
|
+
Accept:
|
14
|
+
- "*/*"
|
15
|
+
User-Agent:
|
16
|
+
- Ruby
|
17
|
+
Content-Type:
|
18
|
+
- application/json
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Cache-Control:
|
25
|
+
- no-cache
|
26
|
+
Content-Type:
|
27
|
+
- application/json; charset=utf-8
|
28
|
+
Date:
|
29
|
+
- Mon, 11 Apr 2016 17:56:52 GMT
|
30
|
+
Dd-Pool:
|
31
|
+
- dogweb_sameorig
|
32
|
+
Pragma:
|
33
|
+
- no-cache
|
34
|
+
Set-Cookie:
|
35
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:52 GMT"; Max-Age=604800; Path=/
|
36
|
+
Strict-Transport-Security:
|
37
|
+
- max-age=15724800;
|
38
|
+
Vary:
|
39
|
+
- Accept-Encoding
|
40
|
+
X-Content-Type-Options:
|
41
|
+
- nosniff
|
42
|
+
X-Dd-Debug:
|
43
|
+
- shLvnveJ2e0AhnkU64mVlENQB1xkt+HLpGk7+KtFz6g=
|
44
|
+
X-Dd-Version:
|
45
|
+
- '33.3404'
|
46
|
+
X-Frame-Options:
|
47
|
+
- SAMEORIGIN
|
48
|
+
Content-Length:
|
49
|
+
- '297'
|
50
|
+
Connection:
|
51
|
+
- keep-alive
|
52
|
+
body:
|
53
|
+
encoding: UTF-8
|
54
|
+
string: '{"event_object":"8ee60aa761d2c9f71a2c1ba4979a0363","notify_audit":true,"timeout_h":null,"silenced":false,"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
55
|
+
> 5","message":"","id":552993,"name":"**test.metric.metric** over **host:test.metric.host**
|
56
|
+
was **> 5.0** on average during the **last 10m**.","no_data_timeframe":false,"creator":2575,"notify_no_data":false,"renotify_interval":null,"state":"No
|
57
|
+
Data","escalation_message":"","silenced_timeout_ts":null}'
|
58
|
+
http_version:
|
59
|
+
recorded_at: Mon, 11 Apr 2016 17:56:52 GMT
|
60
|
+
- request:
|
61
|
+
method: delete
|
62
|
+
uri: https://app.datadoghq.com/api/v1/alert/552993?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
63
|
+
body:
|
64
|
+
encoding: US-ASCII
|
65
|
+
string: ''
|
66
|
+
headers:
|
67
|
+
Accept-Encoding:
|
68
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
69
|
+
Accept:
|
70
|
+
- "*/*"
|
71
|
+
User-Agent:
|
72
|
+
- Ruby
|
73
|
+
response:
|
74
|
+
status:
|
75
|
+
code: 200
|
76
|
+
message: OK
|
77
|
+
headers:
|
78
|
+
Cache-Control:
|
79
|
+
- no-cache
|
80
|
+
Content-Type:
|
81
|
+
- application/json; charset=utf-8
|
82
|
+
Date:
|
83
|
+
- Mon, 11 Apr 2016 17:56:52 GMT
|
84
|
+
Dd-Pool:
|
85
|
+
- dogweb_sameorig
|
86
|
+
Pragma:
|
87
|
+
- no-cache
|
88
|
+
Set-Cookie:
|
89
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:52 GMT"; Max-Age=604800; Path=/
|
90
|
+
Strict-Transport-Security:
|
91
|
+
- max-age=15724800;
|
92
|
+
Vary:
|
93
|
+
- Accept-Encoding
|
94
|
+
X-Content-Type-Options:
|
95
|
+
- nosniff
|
96
|
+
X-Dd-Debug:
|
97
|
+
- 9PJnOICwaMTA2SdUy+bwstzTca5UfvMAFI9em8DSBRc=
|
98
|
+
X-Dd-Version:
|
99
|
+
- '33.3404'
|
100
|
+
X-Frame-Options:
|
101
|
+
- SAMEORIGIN
|
102
|
+
Content-Length:
|
103
|
+
- '288'
|
104
|
+
Connection:
|
105
|
+
- keep-alive
|
106
|
+
body:
|
107
|
+
encoding: UTF-8
|
108
|
+
string: '{"event_object":"8ee60aa761d2c9f71a2c1ba4979a0363","notify_audit":true,"timeout_h":null,"silenced":false,"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
109
|
+
> 5","message":"","name":"**test.metric.metric** over **host:test.metric.host**
|
110
|
+
was **> 5.0** on average during the **last 10m**.","no_data_timeframe":false,"creator":2575,"notify_no_data":false,"renotify_interval":null,"state":"No
|
111
|
+
Data","escalation_message":"","silenced_timeout_ts":null}'
|
112
|
+
http_version:
|
113
|
+
recorded_at: Mon, 11 Apr 2016 17:56:52 GMT
|
114
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,193 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=<DATADOG_API_KEY>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"msg_text":"Testing Aggregation (first)","date_happened":1460397384,"msg_title":"","priority":"normal","parent":null,"tags":[],"aggregation_key":"1460397384","alert_type":null,"event_type":null,"source_type_name":null,"title":"","text":"Testing
|
9
|
+
Aggregation (first)","host":"dogbox-yannmahe","device":null}'
|
10
|
+
headers:
|
11
|
+
Accept-Encoding:
|
12
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
13
|
+
Accept:
|
14
|
+
- "*/*"
|
15
|
+
User-Agent:
|
16
|
+
- Ruby
|
17
|
+
Content-Type:
|
18
|
+
- application/json
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 202
|
22
|
+
message: Accepted
|
23
|
+
headers:
|
24
|
+
Content-Type:
|
25
|
+
- text/plain; charset=utf-8
|
26
|
+
Date:
|
27
|
+
- Mon, 11 Apr 2016 17:56:24 GMT
|
28
|
+
Dd-Pool:
|
29
|
+
- propjoe
|
30
|
+
Strict-Transport-Security:
|
31
|
+
- max-age=15724800;
|
32
|
+
X-Content-Type-Options:
|
33
|
+
- nosniff
|
34
|
+
Content-Length:
|
35
|
+
- '260'
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: '{"status":"ok","event":{"id":491273719585992541,"title":"","text":"Testing
|
41
|
+
Aggregation (first)","date_happened":1460397384,"handle":null,"priority":"normal","related_event_id":null,"tags":[],"url":"https://app.datadoghq.com/event/event?id=491273719585992541"}}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Mon, 11 Apr 2016 17:56:24 GMT
|
44
|
+
- request:
|
45
|
+
method: post
|
46
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=<DATADOG_API_KEY>
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"msg_text":"Testing Aggregation (second)","date_happened":1460397384,"msg_title":"","priority":"normal","parent":null,"tags":[],"aggregation_key":"1460397384","alert_type":null,"event_type":null,"source_type_name":null,"title":"","text":"Testing
|
50
|
+
Aggregation (second)","host":"dogbox-yannmahe","device":null}'
|
51
|
+
headers:
|
52
|
+
Accept-Encoding:
|
53
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
54
|
+
Accept:
|
55
|
+
- "*/*"
|
56
|
+
User-Agent:
|
57
|
+
- Ruby
|
58
|
+
Content-Type:
|
59
|
+
- application/json
|
60
|
+
response:
|
61
|
+
status:
|
62
|
+
code: 202
|
63
|
+
message: Accepted
|
64
|
+
headers:
|
65
|
+
Content-Type:
|
66
|
+
- text/plain; charset=utf-8
|
67
|
+
Date:
|
68
|
+
- Mon, 11 Apr 2016 17:56:24 GMT
|
69
|
+
Dd-Pool:
|
70
|
+
- propjoe
|
71
|
+
Strict-Transport-Security:
|
72
|
+
- max-age=15724800;
|
73
|
+
X-Content-Type-Options:
|
74
|
+
- nosniff
|
75
|
+
Content-Length:
|
76
|
+
- '261'
|
77
|
+
Connection:
|
78
|
+
- keep-alive
|
79
|
+
body:
|
80
|
+
encoding: UTF-8
|
81
|
+
string: '{"status":"ok","event":{"id":491273721766316527,"title":"","text":"Testing
|
82
|
+
Aggregation (second)","date_happened":1460397384,"handle":null,"priority":"normal","related_event_id":null,"tags":[],"url":"https://app.datadoghq.com/event/event?id=491273721766316527"}}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Mon, 11 Apr 2016 17:56:24 GMT
|
85
|
+
- request:
|
86
|
+
method: get
|
87
|
+
uri: https://app.datadoghq.com/api/v1/events/491273719585992541?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
Accept-Encoding:
|
93
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
94
|
+
Accept:
|
95
|
+
- "*/*"
|
96
|
+
User-Agent:
|
97
|
+
- Ruby
|
98
|
+
response:
|
99
|
+
status:
|
100
|
+
code: 200
|
101
|
+
message: OK
|
102
|
+
headers:
|
103
|
+
Cache-Control:
|
104
|
+
- no-cache
|
105
|
+
Content-Type:
|
106
|
+
- application/json
|
107
|
+
Date:
|
108
|
+
- Mon, 11 Apr 2016 17:56:33 GMT
|
109
|
+
Dd-Pool:
|
110
|
+
- dogweb_sameorig
|
111
|
+
Pragma:
|
112
|
+
- no-cache
|
113
|
+
Set-Cookie:
|
114
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:33 GMT"; Max-Age=604800; Path=/
|
115
|
+
Strict-Transport-Security:
|
116
|
+
- max-age=15724800;
|
117
|
+
Vary:
|
118
|
+
- Accept-Encoding
|
119
|
+
X-Content-Type-Options:
|
120
|
+
- nosniff
|
121
|
+
X-Dd-Debug:
|
122
|
+
- Bj/SqNU1vbZGxNGffIRtmaWe7MKGSPoKHC3+ZhLAjqk=
|
123
|
+
X-Dd-Version:
|
124
|
+
- '33.3404'
|
125
|
+
X-Frame-Options:
|
126
|
+
- SAMEORIGIN
|
127
|
+
Content-Length:
|
128
|
+
- '230'
|
129
|
+
Connection:
|
130
|
+
- keep-alive
|
131
|
+
body:
|
132
|
+
encoding: UTF-8
|
133
|
+
string: '{"event": {"date_happened": 1460397384, "alert_type": "info", "resource":
|
134
|
+
"/api/v1/events/491273719585992541", "title": "", "url": "/event/event?event_id=491273719585992541",
|
135
|
+
"text": "Testing Aggregation (first)", "tags": [], "device_name": null, "priority":
|
136
|
+
"normal", "host": "dogbox-yannmahe", "id": 491273719585992541}}'
|
137
|
+
http_version:
|
138
|
+
recorded_at: Mon, 11 Apr 2016 17:56:33 GMT
|
139
|
+
- request:
|
140
|
+
method: get
|
141
|
+
uri: https://app.datadoghq.com/api/v1/events/491273721766316527?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
|
142
|
+
body:
|
143
|
+
encoding: US-ASCII
|
144
|
+
string: ''
|
145
|
+
headers:
|
146
|
+
Accept-Encoding:
|
147
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
148
|
+
Accept:
|
149
|
+
- "*/*"
|
150
|
+
User-Agent:
|
151
|
+
- Ruby
|
152
|
+
response:
|
153
|
+
status:
|
154
|
+
code: 200
|
155
|
+
message: OK
|
156
|
+
headers:
|
157
|
+
Cache-Control:
|
158
|
+
- no-cache
|
159
|
+
Content-Type:
|
160
|
+
- application/json
|
161
|
+
Date:
|
162
|
+
- Mon, 11 Apr 2016 17:56:33 GMT
|
163
|
+
Dd-Pool:
|
164
|
+
- dogweb_sameorig
|
165
|
+
Pragma:
|
166
|
+
- no-cache
|
167
|
+
Set-Cookie:
|
168
|
+
- DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:33 GMT"; Max-Age=604800; Path=/
|
169
|
+
Strict-Transport-Security:
|
170
|
+
- max-age=15724800;
|
171
|
+
Vary:
|
172
|
+
- Accept-Encoding
|
173
|
+
X-Content-Type-Options:
|
174
|
+
- nosniff
|
175
|
+
X-Dd-Debug:
|
176
|
+
- wZ/CfAcuKqv18nSeAYtvn7MAell4CbOc+cxqaasVWcY=
|
177
|
+
X-Dd-Version:
|
178
|
+
- '33.3404'
|
179
|
+
X-Frame-Options:
|
180
|
+
- SAMEORIGIN
|
181
|
+
Content-Length:
|
182
|
+
- '229'
|
183
|
+
Connection:
|
184
|
+
- keep-alive
|
185
|
+
body:
|
186
|
+
encoding: UTF-8
|
187
|
+
string: '{"event": {"date_happened": 1460397384, "alert_type": "info", "resource":
|
188
|
+
"/api/v1/events/491273721766316527", "title": "", "url": "/event/event?event_id=491273721766316527",
|
189
|
+
"text": "Testing Aggregation (second)", "tags": [], "device_name": null, "priority":
|
190
|
+
"normal", "host": "dogbox-yannmahe", "id": 491273721766316527}}'
|
191
|
+
http_version:
|
192
|
+
recorded_at: Mon, 11 Apr 2016 17:56:33 GMT
|
193
|
+
recorded_with: VCR 2.9.3
|