dogapi 1.8.1 → 1.9.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.
- data/.rspec +2 -0
- data/.tailor +106 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +7 -0
- data/README.rdoc +4 -1
- data/Rakefile +31 -2
- data/lib/capistrano/datadog.rb +6 -10
- data/lib/dogapi/common.rb +1 -1
- data/lib/dogapi/event.rb +6 -6
- data/lib/dogapi/facade.rb +34 -45
- data/lib/dogapi/v1/alert.rb +1 -1
- data/lib/dogapi/v1/comment.rb +3 -3
- data/lib/dogapi/v1/dash.rb +1 -2
- data/lib/dogapi/v1/event.rb +1 -1
- data/lib/dogapi/v1/metric.rb +3 -3
- data/lib/dogapi/v1/user.rb +1 -1
- data/lib/dogapi/version.rb +1 -1
- data/spec/alerts_spec.rb +33 -0
- data/spec/common_spec.rb +16 -0
- data/spec/facade_spec.rb +122 -0
- data/spec/spec_helper.rb +28 -0
- data/spec/support/cassettes/Alerts/create/returns_HTTP_code_201.yml +90 -0
- data/spec/support/cassettes/Alerts/create/returns_a_valid_event_ID.yml +90 -0
- data/spec/support/cassettes/Alerts/create/returns_the_same_query_as_sent.yml +90 -0
- data/spec/support/cassettes/Facade/Client/emit_point_can_pass_nil_host.yml +32 -0
- data/spec/support/cassettes/Facade/Client/emit_point_passes_data.yml +32 -0
- data/spec/support/cassettes/Facade/Client/emit_point_uses_localhost_default.yml +32 -0
- data/spec/support/cassettes/Facade/Client/emits_point_with_localhost.yml +32 -0
- data/spec/support/cassettes/Facade/Events/emits_aggregate_events.yml +131 -0
- data/spec/support/cassettes/Facade/Events/emits_events_and_retrieves_them.yml +67 -0
- data/spec/support/cassettes/Facade/Events/emits_events_with_specified_priority.yml +67 -0
- data/spec/support/cassettes/Facade/Tags/adds_updates_and_detaches_tags.yml +352 -0
- data/tests/test_alerts.rb +3 -3
- data/tests/test_client.rb +0 -114
- data/tests/test_dashes.rb +3 -2
- metadata +38 -7
@@ -0,0 +1,90 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/alert?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
|
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:
|
12
|
+
- ! '*/*'
|
13
|
+
User-Agent:
|
14
|
+
- Ruby
|
15
|
+
Content-Type:
|
16
|
+
- application/json
|
17
|
+
response:
|
18
|
+
status:
|
19
|
+
code: 201
|
20
|
+
message: Created
|
21
|
+
headers:
|
22
|
+
Cache-Control:
|
23
|
+
- no-cache
|
24
|
+
Content-Type:
|
25
|
+
- application/json
|
26
|
+
Date:
|
27
|
+
- Tue, 27 Aug 2013 16:13:41 GMT
|
28
|
+
Pragma:
|
29
|
+
- no-cache
|
30
|
+
Server:
|
31
|
+
- gunicorn/0.17.4
|
32
|
+
Set-Cookie:
|
33
|
+
- user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
|
34
|
+
X-Dd-Version:
|
35
|
+
- 31.153-293-3859d5c
|
36
|
+
Content-Length:
|
37
|
+
- '328'
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '{"notify_no_data": false, "event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0",
|
43
|
+
"state": "OK", "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
44
|
+
> 5", "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
45
|
+
> 5", "message": null, "creator": 3658, "id": 37496, "timeout_h": null}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Tue, 27 Aug 2013 16:13:41 GMT
|
48
|
+
- request:
|
49
|
+
method: delete
|
50
|
+
uri: https://app.datadoghq.com/api/v1/alert/37496?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
|
51
|
+
body:
|
52
|
+
encoding: US-ASCII
|
53
|
+
string: ''
|
54
|
+
headers:
|
55
|
+
Accept:
|
56
|
+
- ! '*/*'
|
57
|
+
User-Agent:
|
58
|
+
- Ruby
|
59
|
+
response:
|
60
|
+
status:
|
61
|
+
code: 200
|
62
|
+
message: OK
|
63
|
+
headers:
|
64
|
+
Cache-Control:
|
65
|
+
- no-cache
|
66
|
+
Content-Type:
|
67
|
+
- application/json
|
68
|
+
Date:
|
69
|
+
- Tue, 27 Aug 2013 16:13:41 GMT
|
70
|
+
Pragma:
|
71
|
+
- no-cache
|
72
|
+
Server:
|
73
|
+
- gunicorn/0.17.4
|
74
|
+
Set-Cookie:
|
75
|
+
- user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
|
76
|
+
X-Dd-Version:
|
77
|
+
- 31.153-293-3859d5c
|
78
|
+
Content-Length:
|
79
|
+
- '315'
|
80
|
+
Connection:
|
81
|
+
- keep-alive
|
82
|
+
body:
|
83
|
+
encoding: US-ASCII
|
84
|
+
string: ! '{"notify_no_data": false, "event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0",
|
85
|
+
"state": "OK", "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
86
|
+
> 5", "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
|
87
|
+
> 5", "message": null, "creator": 3658, "timeout_h": null}'
|
88
|
+
http_version:
|
89
|
+
recorded_at: Tue, 27 Aug 2013 16:13:41 GMT
|
90
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
6
|
+
body:
|
7
|
+
string: "{\"series\":[{\"type\":\"gauge\",\"points\":[[1378327806,0.0]],\"host\":null,\"metric\":\"metric.name\",\"device\":null}]}"
|
8
|
+
headers:
|
9
|
+
Content-Type:
|
10
|
+
- application/json
|
11
|
+
Accept:
|
12
|
+
- "*/*"
|
13
|
+
response:
|
14
|
+
status:
|
15
|
+
code: 202
|
16
|
+
message: Accepted
|
17
|
+
headers:
|
18
|
+
Content-Length:
|
19
|
+
- "15"
|
20
|
+
Server:
|
21
|
+
- dogdispatcher/4.7.0
|
22
|
+
Content-Type:
|
23
|
+
- text/json; charset=UTF-8
|
24
|
+
Date:
|
25
|
+
- Wed, 04 Sep 2013 20:55:33 GMT
|
26
|
+
Connection:
|
27
|
+
- keep-alive
|
28
|
+
body:
|
29
|
+
string: "{\"status\":\"ok\"}"
|
30
|
+
http_version:
|
31
|
+
recorded_at: Wed, 04 Sep 2013 20:50:06 GMT
|
32
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
6
|
+
body:
|
7
|
+
string: "{\"series\":[{\"type\":\"gauge\",\"points\":[[1378327804,0.0]],\"host\":\"myhost\",\"metric\":\"metric.name\",\"device\":null}]}"
|
8
|
+
headers:
|
9
|
+
Content-Type:
|
10
|
+
- application/json
|
11
|
+
Accept:
|
12
|
+
- "*/*"
|
13
|
+
response:
|
14
|
+
status:
|
15
|
+
code: 202
|
16
|
+
message: Accepted
|
17
|
+
headers:
|
18
|
+
Content-Length:
|
19
|
+
- "15"
|
20
|
+
Server:
|
21
|
+
- dogdispatcher/4.7.0
|
22
|
+
Content-Type:
|
23
|
+
- text/json; charset=UTF-8
|
24
|
+
Date:
|
25
|
+
- Wed, 04 Sep 2013 20:55:32 GMT
|
26
|
+
Connection:
|
27
|
+
- keep-alive
|
28
|
+
body:
|
29
|
+
string: "{\"status\":\"ok\"}"
|
30
|
+
http_version:
|
31
|
+
recorded_at: Wed, 04 Sep 2013 20:50:05 GMT
|
32
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
6
|
+
body:
|
7
|
+
string: "{\"series\":[{\"type\":\"gauge\",\"points\":[[1378327805,0.0]],\"host\":\"dogbox\",\"metric\":\"metric.name\",\"device\":null}]}"
|
8
|
+
headers:
|
9
|
+
Content-Type:
|
10
|
+
- application/json
|
11
|
+
Accept:
|
12
|
+
- "*/*"
|
13
|
+
response:
|
14
|
+
status:
|
15
|
+
code: 202
|
16
|
+
message: Accepted
|
17
|
+
headers:
|
18
|
+
Content-Length:
|
19
|
+
- "15"
|
20
|
+
Server:
|
21
|
+
- dogdispatcher/4.7.0
|
22
|
+
Content-Type:
|
23
|
+
- text/json; charset=UTF-8
|
24
|
+
Date:
|
25
|
+
- Wed, 04 Sep 2013 20:55:32 GMT
|
26
|
+
Connection:
|
27
|
+
- keep-alive
|
28
|
+
body:
|
29
|
+
string: "{\"status\":\"ok\"}"
|
30
|
+
http_version:
|
31
|
+
recorded_at: Wed, 04 Sep 2013 20:50:06 GMT
|
32
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
6
|
+
body:
|
7
|
+
string: "{\"series\":[{\"type\":\"gauge\",\"points\":[[1377629527,0.0]],\"host\":\"dogbox\",\"metric\":\"metric.name\",\"device\":null}]}"
|
8
|
+
headers:
|
9
|
+
Accept:
|
10
|
+
- "*/*"
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
response:
|
14
|
+
status:
|
15
|
+
code: 202
|
16
|
+
message: Accepted
|
17
|
+
headers:
|
18
|
+
Server:
|
19
|
+
- dogdispatcher/4.6.6
|
20
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Date:
|
23
|
+
- Tue, 27 Aug 2013 18:52:14 GMT
|
24
|
+
Content-Type:
|
25
|
+
- text/json; charset=UTF-8
|
26
|
+
Content-Length:
|
27
|
+
- "15"
|
28
|
+
body:
|
29
|
+
string: "{\"status\":\"ok\"}"
|
30
|
+
http_version:
|
31
|
+
recorded_at: Tue, 27 Aug 2013 18:52:14 GMT
|
32
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,131 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
6
|
+
body:
|
7
|
+
string: "{\"parent\":null,\"msg_title\":\"\",\"event_type\":null,\"msg_text\":\"Testing Aggregation (first)\",\"host\":\"dogbox\",\"date_happened\":1377812901,\"source_type_name\":null,\"device\":null,\"aggregation_key\":\"1377812901\",\"tags\":[],\"title\":\"\",\"alert_type\":null,\"text\":\"Testing Aggregation (first)\",\"priority\":\"normal\"}"
|
8
|
+
headers:
|
9
|
+
Accept:
|
10
|
+
- "*/*"
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
response:
|
14
|
+
status:
|
15
|
+
code: 202
|
16
|
+
message: Accepted
|
17
|
+
headers:
|
18
|
+
Date:
|
19
|
+
- Thu, 29 Aug 2013 21:48:21 GMT
|
20
|
+
Server:
|
21
|
+
- dogdispatcher/4.7.0
|
22
|
+
Content-Length:
|
23
|
+
- "265"
|
24
|
+
Content-Type:
|
25
|
+
- text/json; charset=UTF-8
|
26
|
+
Connection:
|
27
|
+
- keep-alive
|
28
|
+
body:
|
29
|
+
string: "{\"status\": \"ok\", \"event\": {\"priority\": \"normal\", \"date_happened\": 1377812901, \"handle\": null, \"title\": \"\", \"url\": \"https://app.datadoghq.com/event/jump_to?event_id=1905053479102714219\", \"text\": null, \"tags\": [], \"related_event_id\": null, \"id\": 1905053479102714219}}"
|
30
|
+
http_version:
|
31
|
+
recorded_at: Thu, 29 Aug 2013 21:48:21 GMT
|
32
|
+
- request:
|
33
|
+
method: post
|
34
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
35
|
+
body:
|
36
|
+
string: "{\"parent\":null,\"msg_title\":\"\",\"event_type\":null,\"msg_text\":\"Testing Aggregation (second)\",\"host\":\"dogbox\",\"date_happened\":1377812901,\"source_type_name\":null,\"device\":null,\"aggregation_key\":\"1377812901\",\"tags\":[],\"title\":\"\",\"alert_type\":null,\"text\":\"Testing Aggregation (second)\",\"priority\":\"normal\"}"
|
37
|
+
headers:
|
38
|
+
Accept:
|
39
|
+
- "*/*"
|
40
|
+
Content-Type:
|
41
|
+
- application/json
|
42
|
+
response:
|
43
|
+
status:
|
44
|
+
code: 202
|
45
|
+
message: Accepted
|
46
|
+
headers:
|
47
|
+
Date:
|
48
|
+
- Thu, 29 Aug 2013 21:48:22 GMT
|
49
|
+
Server:
|
50
|
+
- dogdispatcher/4.7.0
|
51
|
+
Content-Length:
|
52
|
+
- "265"
|
53
|
+
Content-Type:
|
54
|
+
- text/json; charset=UTF-8
|
55
|
+
Connection:
|
56
|
+
- keep-alive
|
57
|
+
body:
|
58
|
+
string: "{\"status\": \"ok\", \"event\": {\"priority\": \"normal\", \"date_happened\": 1377812901, \"handle\": null, \"title\": \"\", \"url\": \"https://app.datadoghq.com/event/jump_to?event_id=1905053488548344157\", \"text\": null, \"tags\": [], \"related_event_id\": null, \"id\": 1905053488548344157}}"
|
59
|
+
http_version:
|
60
|
+
recorded_at: Thu, 29 Aug 2013 21:48:22 GMT
|
61
|
+
- request:
|
62
|
+
method: get
|
63
|
+
uri: https://app.datadoghq.com/api/v1/events/1905053479102714219?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
|
64
|
+
body:
|
65
|
+
string: ""
|
66
|
+
headers:
|
67
|
+
Accept:
|
68
|
+
- "*/*"
|
69
|
+
response:
|
70
|
+
status:
|
71
|
+
code: 200
|
72
|
+
message: OK
|
73
|
+
headers:
|
74
|
+
Pragma:
|
75
|
+
- no-cache
|
76
|
+
Date:
|
77
|
+
- Thu, 29 Aug 2013 21:49:38 GMT
|
78
|
+
Set-Cookie:
|
79
|
+
- user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
|
80
|
+
Content-Length:
|
81
|
+
- "362"
|
82
|
+
Server:
|
83
|
+
- gunicorn/0.17.4
|
84
|
+
Content-Type:
|
85
|
+
- application/json
|
86
|
+
Connection:
|
87
|
+
- keep-alive
|
88
|
+
Cache-Control:
|
89
|
+
- no-cache
|
90
|
+
X-Dd-Version:
|
91
|
+
- 31.160-300-bedcb85
|
92
|
+
body:
|
93
|
+
string: "{\"event\": {\"date_happened\": 1377812901, \"alert_type\": \"info\", \"resource\": \"/api/v1/events/1905053479102714219\", \"title\": \"Testing Aggregation (first)\", \"url\": \"/event/jump_to?event_id=1905053479102714219\", \"text\": \"Testing Aggregation (first)\", \"tags\": [], \"id\": 1905053479102714219, \"priority\": \"normal\", \"host\": \"dogbox\", \"device_name\": null, \"payload\": \"{}\"}}"
|
94
|
+
http_version:
|
95
|
+
recorded_at: Thu, 29 Aug 2013 21:49:38 GMT
|
96
|
+
- request:
|
97
|
+
method: get
|
98
|
+
uri: https://app.datadoghq.com/api/v1/events/1905053488548344157?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
|
99
|
+
body:
|
100
|
+
string: ""
|
101
|
+
headers:
|
102
|
+
Accept:
|
103
|
+
- "*/*"
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 200
|
107
|
+
message: OK
|
108
|
+
headers:
|
109
|
+
Pragma:
|
110
|
+
- no-cache
|
111
|
+
Date:
|
112
|
+
- Thu, 29 Aug 2013 21:49:39 GMT
|
113
|
+
Set-Cookie:
|
114
|
+
- user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
|
115
|
+
Content-Length:
|
116
|
+
- "364"
|
117
|
+
Server:
|
118
|
+
- gunicorn/0.17.4
|
119
|
+
Content-Type:
|
120
|
+
- application/json
|
121
|
+
Connection:
|
122
|
+
- keep-alive
|
123
|
+
Cache-Control:
|
124
|
+
- no-cache
|
125
|
+
X-Dd-Version:
|
126
|
+
- 31.160-300-bedcb85
|
127
|
+
body:
|
128
|
+
string: "{\"event\": {\"date_happened\": 1377812901, \"alert_type\": \"info\", \"resource\": \"/api/v1/events/1905053488548344157\", \"title\": \"Testing Aggregation (second)\", \"url\": \"/event/jump_to?event_id=1905053488548344157\", \"text\": \"Testing Aggregation (second)\", \"tags\": [], \"id\": 1905053488548344157, \"priority\": \"normal\", \"host\": \"dogbox\", \"device_name\": null, \"payload\": \"{}\"}}"
|
129
|
+
http_version:
|
130
|
+
recorded_at: Thu, 29 Aug 2013 21:49:38 GMT
|
131
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
6
|
+
body:
|
7
|
+
string: "{\"parent\":null,\"msg_title\":\"dogapi-rb end test title 1377812141\",\"event_type\":null,\"msg_text\":\"test message\",\"host\":\"dogbox\",\"date_happened\":1377812141,\"source_type_name\":null,\"device\":null,\"aggregation_key\":\"\",\"tags\":[\"test-run:1\"],\"title\":\"dogapi-rb end test title 1377812141\",\"alert_type\":null,\"text\":\"test message\",\"priority\":\"normal\"}"
|
8
|
+
headers:
|
9
|
+
Content-Type:
|
10
|
+
- application/json
|
11
|
+
Accept:
|
12
|
+
- "*/*"
|
13
|
+
response:
|
14
|
+
status:
|
15
|
+
code: 202
|
16
|
+
message: Accepted
|
17
|
+
headers:
|
18
|
+
Content-Length:
|
19
|
+
- "312"
|
20
|
+
Content-Type:
|
21
|
+
- text/json; charset=UTF-8
|
22
|
+
Server:
|
23
|
+
- dogdispatcher/4.7.0
|
24
|
+
Connection:
|
25
|
+
- keep-alive
|
26
|
+
Date:
|
27
|
+
- Thu, 29 Aug 2013 21:35:41 GMT
|
28
|
+
body:
|
29
|
+
string: "{\"status\": \"ok\", \"event\": {\"priority\": \"normal\", \"date_happened\": 1377812141, \"handle\": null, \"title\": \"dogapi-rb end test title 1377812141\", \"url\": \"https://app.datadoghq.com/event/jump_to?event_id=1905040728720298327\", \"text\": null, \"tags\": [\"test-run:1\"], \"related_event_id\": null, \"id\": 1905040728720298327}}"
|
30
|
+
http_version:
|
31
|
+
recorded_at: Thu, 29 Aug 2013 21:35:41 GMT
|
32
|
+
- request:
|
33
|
+
method: get
|
34
|
+
uri: https://app.datadoghq.com/api/v1/events/1905040728720298327?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
|
35
|
+
body:
|
36
|
+
string: ""
|
37
|
+
headers:
|
38
|
+
Accept:
|
39
|
+
- "*/*"
|
40
|
+
response:
|
41
|
+
status:
|
42
|
+
code: 200
|
43
|
+
message: OK
|
44
|
+
headers:
|
45
|
+
Content-Length:
|
46
|
+
- "367"
|
47
|
+
Cache-Control:
|
48
|
+
- no-cache
|
49
|
+
Content-Type:
|
50
|
+
- application/json
|
51
|
+
X-Dd-Version:
|
52
|
+
- 31.160-300-bedcb85
|
53
|
+
Set-Cookie:
|
54
|
+
- user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
|
55
|
+
Server:
|
56
|
+
- gunicorn/0.17.4
|
57
|
+
Connection:
|
58
|
+
- keep-alive
|
59
|
+
Pragma:
|
60
|
+
- no-cache
|
61
|
+
Date:
|
62
|
+
- Thu, 29 Aug 2013 21:35:47 GMT
|
63
|
+
body:
|
64
|
+
string: "{\"event\": {\"date_happened\": 1377812141, \"alert_type\": \"info\", \"resource\": \"/api/v1/events/1905040728720298327\", \"title\": \"dogapi-rb end test title 1377812141\", \"url\": \"/event/jump_to?event_id=1905040728720298327\", \"text\": \"test message\", \"tags\": [\"test-run:1\"], \"id\": 1905040728720298327, \"priority\": \"normal\", \"host\": \"dogbox\", \"device_name\": null, \"payload\": \"{}\"}}"
|
65
|
+
http_version:
|
66
|
+
recorded_at: Thu, 29 Aug 2013 21:35:46 GMT
|
67
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=9775a026f1ca7d1c6c5af9d94d9595a4
|
6
|
+
body:
|
7
|
+
string: "{\"parent\":null,\"msg_title\":\"title\",\"event_type\":null,\"msg_text\":\"test message\",\"host\":\"dogbox\",\"date_happened\":1377812695,\"source_type_name\":null,\"device\":null,\"aggregation_key\":\"\",\"tags\":[],\"title\":\"title\",\"alert_type\":null,\"text\":\"test message\",\"priority\":\"low\"}"
|
8
|
+
headers:
|
9
|
+
Content-Type:
|
10
|
+
- application/json
|
11
|
+
Accept:
|
12
|
+
- "*/*"
|
13
|
+
response:
|
14
|
+
status:
|
15
|
+
code: 202
|
16
|
+
message: Accepted
|
17
|
+
headers:
|
18
|
+
Date:
|
19
|
+
- Thu, 29 Aug 2013 21:44:56 GMT
|
20
|
+
Server:
|
21
|
+
- dogdispatcher/4.7.0
|
22
|
+
Content-Length:
|
23
|
+
- "267"
|
24
|
+
Content-Type:
|
25
|
+
- text/json; charset=UTF-8
|
26
|
+
Connection:
|
27
|
+
- keep-alive
|
28
|
+
body:
|
29
|
+
string: "{\"status\": \"ok\", \"event\": {\"priority\": \"low\", \"date_happened\": 1377812695, \"handle\": null, \"title\": \"title\", \"url\": \"https://app.datadoghq.com/event/jump_to?event_id=1905050031133446537\", \"text\": null, \"tags\": [], \"related_event_id\": null, \"id\": 1905050031133446537}}"
|
30
|
+
http_version:
|
31
|
+
recorded_at: Thu, 29 Aug 2013 21:44:56 GMT
|
32
|
+
- request:
|
33
|
+
method: get
|
34
|
+
uri: https://app.datadoghq.com/api/v1/events/1905050031133446537?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
|
35
|
+
body:
|
36
|
+
string: ""
|
37
|
+
headers:
|
38
|
+
Accept:
|
39
|
+
- "*/*"
|
40
|
+
response:
|
41
|
+
status:
|
42
|
+
code: 200
|
43
|
+
message: OK
|
44
|
+
headers:
|
45
|
+
Date:
|
46
|
+
- Thu, 29 Aug 2013 21:54:11 GMT
|
47
|
+
Set-Cookie:
|
48
|
+
- user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
|
49
|
+
Server:
|
50
|
+
- gunicorn/0.17.4
|
51
|
+
Content-Length:
|
52
|
+
- "322"
|
53
|
+
Content-Type:
|
54
|
+
- application/json
|
55
|
+
Pragma:
|
56
|
+
- no-cache
|
57
|
+
Connection:
|
58
|
+
- keep-alive
|
59
|
+
X-Dd-Version:
|
60
|
+
- 31.160-300-bedcb85
|
61
|
+
Cache-Control:
|
62
|
+
- no-cache
|
63
|
+
body:
|
64
|
+
string: "{\"event\": {\"date_happened\": 1377812695, \"alert_type\": \"info\", \"resource\": \"/api/v1/events/1905050031133446537\", \"title\": \"title\", \"url\": \"/event/jump_to?event_id=1905050031133446537\", \"text\": \"test message\", \"tags\": [], \"id\": 1905050031133446537, \"priority\": \"low\", \"host\": \"dogbox\", \"device_name\": null, \"payload\": \"{}\"}}"
|
65
|
+
http_version:
|
66
|
+
recorded_at: Thu, 29 Aug 2013 21:54:11 GMT
|
67
|
+
recorded_with: VCR 2.5.0
|