dogapi 1.9.2 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
3
  - 1.9.3
5
4
  - 2.0.0
@@ -1,6 +1,11 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ # 1.10.0 / 2014-05-13
5
+ * Re-enable SSL verification ([#37](https://github.com/DataDog/dogapi-rb/issues/37))
6
+ * Make http timeout configurable ([#29](https://github.com/DataDog/dogapi-rb/issues/29))
7
+ * Report application name when deploy with Capistrano (thanks [@ArjenSchwarz][] [#46](https://github.com/DataDog/dogapi-rb/pull/46))
8
+
4
9
  # 1.9.2 / 2014-02-13
5
10
  * Fully support for capistrano v3 ([#43](https://github.com/DataDog/dogapi-rb/pull/43))
6
11
  * Strip control characters from capistrano messages ([#36](https://github.com/DataDog/dogapi-rb/issues/36))
@@ -49,12 +49,13 @@ module Capistrano
49
49
  @logging_output = {}
50
50
  end
51
51
 
52
- def record_task(task_name, timing, roles, stage=nil)
52
+ def record_task(task_name, timing, roles, stage=nil, application_name=nil)
53
53
  @tasks << {
54
54
  :name => task_name,
55
55
  :timing => timing,
56
56
  :roles => roles,
57
- :stage => stage
57
+ :stage => stage,
58
+ :application => application_name
58
59
  }
59
60
  end
60
61
 
@@ -80,7 +81,11 @@ module Capistrano
80
81
  if !task[:stage].nil? and !task[:stage].empty? then
81
82
  tags << "#stage:#{task[:stage]}"
82
83
  end
83
- title = "%s@%s ran %s on %s with capistrano in %.2f secs" % [user, hostname, name, roles.join(', '), task[:timing]]
84
+ application = ''
85
+ if !task[:application].nil? and !task[:application].empty? then
86
+ application = ' for ' + task[:application]
87
+ end
88
+ title = "%s@%s ran %s%s on %s with capistrano in %.2f secs" % [user, hostname, name, application, roles.join(', '), task[:timing]]
84
89
  type = "deploy"
85
90
  alert_type = "success"
86
91
  source_type = "capistrano"
@@ -32,7 +32,7 @@ module Capistrano
32
32
  if roles.is_a? Proc
33
33
  roles = roles.call
34
34
  end
35
- reporter.record_task(task_name, timing.real, roles, task.namespace.variables[:stage])
35
+ reporter.record_task(task_name, timing.real, roles, task.namespace.variables[:stage], fetch(:application))
36
36
 
37
37
  # Return the original result
38
38
  result
@@ -15,7 +15,7 @@ module Rake
15
15
  result = old_invoke(*args)
16
16
  end
17
17
  reporter.record_task(task_name, timing.real, roles,
18
- Capistrano::Configuration.env.fetch(:stage))
18
+ Capistrano::Configuration.env.fetch(:stage), Capistrano::Configuration.env.fetch(:application))
19
19
  result
20
20
  end
21
21
  end
@@ -33,10 +33,6 @@ module Dogapi
33
33
  session = Net::HTTP.new(uri.host, uri.port)
34
34
  if 'https' == uri.scheme
35
35
  session.use_ssl = true
36
- # FIXME - turn off SSL verification for now until we can spend
37
- # some time figuring out how to find certs across platforms.
38
- # - matt 10/06/2011
39
- session.verify_mode = OpenSSL::SSL::VERIFY_NONE
40
36
  end
41
37
  session.start do |conn|
42
38
  yield(conn)
@@ -73,11 +69,12 @@ module Dogapi
73
69
 
74
70
  # Superclass that deals with the details of communicating with the DataDog API
75
71
  class APIService
76
- def initialize(api_key, application_key, silent=true)
72
+ def initialize(api_key, application_key, silent=true, timeout=nil)
77
73
  @api_key = api_key
78
74
  @application_key = application_key
79
75
  @api_host = Dogapi.find_datadog_host()
80
76
  @silent = silent
77
+ @timeout = timeout || 5
81
78
  end
82
79
 
83
80
  # Manages the HTTP connection
@@ -86,13 +83,9 @@ module Dogapi
86
83
  session = Net::HTTP.new(uri.host, uri.port)
87
84
  if 'https' == uri.scheme
88
85
  session.use_ssl = true
89
- # FIXME - turn off SSL verification for now until we can spend
90
- # some time figuring out how to find certs across platforms.
91
- # - matt 10/06/2011
92
- session.verify_mode = OpenSSL::SSL::VERIFY_NONE
93
86
  end
94
87
  session.start do |conn|
95
- conn.read_timeout = 5
88
+ conn.read_timeout = @timeout
96
89
  yield(conn)
97
90
  end
98
91
  end
@@ -11,7 +11,7 @@ module Dogapi
11
11
  class Client
12
12
 
13
13
  # Create a new Client optionally specifying a default host and device
14
- def initialize(api_key, application_key=nil, host=nil, device=nil, silent=true)
14
+ def initialize(api_key, application_key=nil, host=nil, device=nil, silent=true, timeout=nil)
15
15
 
16
16
  if api_key
17
17
  @api_key = api_key
@@ -27,16 +27,17 @@ module Dogapi
27
27
 
28
28
  @device = device
29
29
 
30
- @metric_svc = Dogapi::V1::MetricService.new(@api_key, @application_key, silent)
31
- @event_svc = Dogapi::V1::EventService.new(@api_key, @application_key, silent)
32
- @tag_svc = Dogapi::V1::TagService.new(@api_key, @application_key, silent)
33
- @comment_svc = Dogapi::V1::CommentService.new(@api_key, @application_key, silent)
34
- @search_svc = Dogapi::V1::SearchService.new(@api_key, @application_key, silent)
35
- @dash_service = Dogapi::V1::DashService.new(@api_key, @application_key, silent)
36
- @alert_svc = Dogapi::V1::AlertService.new(@api_key, @application_key, silent)
37
- @user_svc = Dogapi::V1::UserService.new(@api_key, @application_key, silent)
38
- @snapshot_svc = Dogapi::V1::SnapshotService.new(@api_key, @application_key, silent)
39
- @screenboard_svc = Dogapi::V1::ScreenboardService.new(@api_key, @application_key, silent)
30
+ # FIXME: refactor to avoid all this code duplication
31
+ @metric_svc = Dogapi::V1::MetricService.new(@api_key, @application_key, silent, timeout)
32
+ @event_svc = Dogapi::V1::EventService.new(@api_key, @application_key, silent, timeout)
33
+ @tag_svc = Dogapi::V1::TagService.new(@api_key, @application_key, silent, timeout)
34
+ @comment_svc = Dogapi::V1::CommentService.new(@api_key, @application_key, silent, timeout)
35
+ @search_svc = Dogapi::V1::SearchService.new(@api_key, @application_key, silent, timeout)
36
+ @dash_service = Dogapi::V1::DashService.new(@api_key, @application_key, silent, timeout)
37
+ @alert_svc = Dogapi::V1::AlertService.new(@api_key, @application_key, silent, timeout)
38
+ @user_svc = Dogapi::V1::UserService.new(@api_key, @application_key, silent, timeout)
39
+ @snapshot_svc = Dogapi::V1::SnapshotService.new(@api_key, @application_key, silent, timeout)
40
+ @screenboard_svc = Dogapi::V1::ScreenboardService.new(@api_key, @application_key, silent, timeout)
40
41
 
41
42
  @legacy_event_svc = Dogapi::EventService.new(@datadog_host)
42
43
  end
@@ -1,3 +1,3 @@
1
1
  module Dogapi
2
- VERSION = "1.9.2"
2
+ VERSION = "1.10.0"
3
3
  end
@@ -61,7 +61,7 @@ describe "Facade", :vcr => true do
61
61
 
62
62
  code, resp = @dog.emit_event(event)
63
63
  now_event_id = resp["event"]["id"]
64
-
64
+ sleep 5
65
65
  code, resp = @dog.get_event(now_event_id)
66
66
  expect(resp['event']).not_to be_nil
67
67
  expect(resp['event']['text']).to eq(now_message)
@@ -71,7 +71,7 @@ describe "Facade", :vcr => true do
71
71
  event = Dogapi::Event.new('test message', :msg_title => 'title', :date_happened => Time.now(), :priority => "low")
72
72
  code, resp = @dog.emit_event(event)
73
73
  low_event_id = resp["event"]["id"]
74
-
74
+ sleep 5
75
75
  code, resp = @dog.get_event(low_event_id)
76
76
  expect(resp['event']).not_to be_nil
77
77
  low_event = resp['event']
@@ -84,7 +84,7 @@ describe "Facade", :vcr => true do
84
84
  first = resp["event"]["id"]
85
85
  code, resp = @dog.emit_event(Dogapi::Event.new("Testing Aggregation (second)", :aggregation_key => now.to_i))
86
86
  second = resp["event"]["id"]
87
-
87
+ sleep 5
88
88
  code, resp = @dog.get_event(first)
89
89
  expect(resp["event"]).not_to be_nil
90
90
  code, resp = @dog.get_event(second)
@@ -98,7 +98,7 @@ describe "Facade", :vcr => true do
98
98
  hostname = "test.tag.host"
99
99
 
100
100
  @dog.emit_point('test.tag.metric', 1, :host => hostname)
101
-
101
+ sleep 5
102
102
  @dog.detach_tags(hostname)
103
103
  code, resp = @dog.host_tags(hostname)
104
104
  expect(resp["tags"]).to be_empty
@@ -1,5 +1,102 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://app.datadoghq.com/api/v1/alert/37498?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Cache-Control:
20
+ - no-cache
21
+ Content-Type:
22
+ - application/json
23
+ Date:
24
+ - Tue, 27 Aug 2013 16:13:42 GMT
25
+ Pragma:
26
+ - no-cache
27
+ Server:
28
+ - gunicorn/0.17.4
29
+ Set-Cookie:
30
+ - user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
31
+ X-Dd-Version:
32
+ - 31.153-293-3859d5c
33
+ Content-Length:
34
+ - '315'
35
+ Connection:
36
+ - keep-alive
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! '{"notify_no_data": false, "event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0",
40
+ "state": "OK", "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
41
+ > 5", "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
42
+ > 5", "message": null, "creator": 3658, "timeout_h": null}'
43
+ http_version:
44
+ recorded_at: Tue, 27 Aug 2013 16:13:42 GMT
45
+ - request:
46
+ method: delete
47
+ uri: https://app.datadoghq.com/api/v1/alert/?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Accept:
53
+ - ! '*/*'
54
+ User-Agent:
55
+ - Ruby
56
+ response:
57
+ status:
58
+ code: 404
59
+ message: Not Found
60
+ headers:
61
+ Cache-Control:
62
+ - no-cache
63
+ Content-Type:
64
+ - text/html; charset=utf-8
65
+ Date:
66
+ - Thu, 08 May 2014 18:13:02 GMT
67
+ Pragma:
68
+ - no-cache
69
+ Server:
70
+ - gunicorn/0.17.4
71
+ Set-Cookie:
72
+ - user={"org":{"id":1499,"time_zone":null},"_type":"User","id":3658,"time_zone":null};
73
+ Path=/
74
+ X-Dd-Version:
75
+ - 31.1104.1337
76
+ Content-Length:
77
+ - '1178'
78
+ Connection:
79
+ - keep-alive
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! "\n <html>\n <head>\n <title>Error
83
+ 404 | Datadog</title>\n <link href=\"/static/css/datadog.css?v=31.1104.1337\"
84
+ media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n </head>\n
85
+ \ <body>\n <div class=\"header\">\n <div
86
+ class=\"header_content\">\n <a name=\"top\"></a>\n <h1
87
+ id=\"logo\">\n <a href=\"/\">Datadog</a>\n </h1>\n
88
+ \ <!--header_content--></div>\n <!--header--></div>\n
89
+ \ <div class=\"error_page clearfix\">\n <img alt=\"sad
90
+ datadog\" id=\"sad_bits\" src=\"/static/images/sad_bits.png?v=31.1104.1337\"
91
+ />\n <p class=\"arf\">Arf.</p>\n <h1>404 Not Found</h1>\n
92
+ \ <ul>\n <li><a href=\"/\">Go home &rarr;</a></li>\n
93
+ \ <li><a href=\"http://help.datadoghq.com/\">Datadog help center
94
+ &rarr;</a></li>\n <li><a href=\"/account/settings\">Datadog
95
+ setup basics &rarr;</a></li>\n </ul>\n </div>\n <div
96
+ class=\"version_number\">Copyright Datadog, Inc. 2014</div>\n </body>\n
97
+ \ </html>\n\n "
98
+ http_version:
99
+ recorded_at: Thu, 08 May 2014 18:08:39 GMT
3
100
  - request:
4
101
  method: post
5
102
  uri: https://app.datadoghq.com/api/v1/alert?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
@@ -24,30 +121,32 @@ http_interactions:
24
121
  Content-Type:
25
122
  - application/json
26
123
  Date:
27
- - Tue, 27 Aug 2013 16:13:42 GMT
124
+ - Tue, 13 May 2014 19:48:03 GMT
28
125
  Pragma:
29
126
  - no-cache
30
127
  Server:
31
128
  - gunicorn/0.17.4
32
129
  Set-Cookie:
33
- - user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
130
+ - user={"org":{"id":1499,"time_zone":null},"_type":"User","id":3658,"time_zone":null};
131
+ Path=/
34
132
  X-Dd-Version:
35
- - 31.153-293-3859d5c
133
+ - 31.1129.1362-0
36
134
  Content-Length:
37
- - '328'
135
+ - '379'
38
136
  Connection:
39
137
  - keep-alive
40
138
  body:
41
139
  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": 37498, "timeout_h": null}'
140
+ string: ! '{"event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0", "notify_audit":
141
+ true, "timeout_h": null, "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
142
+ > 5", "message": null, "id": 57371, "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
143
+ > 5", "silenced_timeout_ts": null, "creator": 3658, "notify_no_data": false,
144
+ "state": "OK"}'
46
145
  http_version:
47
- recorded_at: Tue, 27 Aug 2013 16:13:42 GMT
146
+ recorded_at: Tue, 13 May 2014 19:48:04 GMT
48
147
  - request:
49
148
  method: delete
50
- uri: https://app.datadoghq.com/api/v1/alert/37498?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
149
+ uri: https://app.datadoghq.com/api/v1/alert/57371?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
51
150
  body:
52
151
  encoding: US-ASCII
53
152
  string: ''
@@ -66,25 +165,27 @@ http_interactions:
66
165
  Content-Type:
67
166
  - application/json
68
167
  Date:
69
- - Tue, 27 Aug 2013 16:13:42 GMT
168
+ - Tue, 13 May 2014 19:48:04 GMT
70
169
  Pragma:
71
170
  - no-cache
72
171
  Server:
73
172
  - gunicorn/0.17.4
74
173
  Set-Cookie:
75
- - user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
174
+ - user={"org":{"id":1499,"time_zone":null},"_type":"User","id":3658,"time_zone":null};
175
+ Path=/
76
176
  X-Dd-Version:
77
- - 31.153-293-3859d5c
177
+ - 31.1129.1362-0
78
178
  Content-Length:
79
- - '315'
179
+ - '366'
80
180
  Connection:
81
181
  - keep-alive
82
182
  body:
83
183
  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}'
184
+ string: ! '{"event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0", "notify_audit":
185
+ true, "timeout_h": null, "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
186
+ > 5", "message": null, "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
187
+ > 5", "silenced_timeout_ts": null, "creator": 3658, "notify_no_data": false,
188
+ "state": "OK"}'
88
189
  http_version:
89
- recorded_at: Tue, 27 Aug 2013 16:13:42 GMT
90
- recorded_with: VCR 2.5.0
190
+ recorded_at: Tue, 13 May 2014 19:48:04 GMT
191
+ recorded_with: VCR 2.9.0
@@ -1,5 +1,91 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://app.datadoghq.com/api/v1/alert/37497?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Cache-Control:
20
+ - no-cache
21
+ Content-Type:
22
+ - application/json
23
+ Date:
24
+ - Tue, 27 Aug 2013 16:13:42 GMT
25
+ Pragma:
26
+ - no-cache
27
+ Server:
28
+ - gunicorn/0.17.4
29
+ Set-Cookie:
30
+ - user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
31
+ X-Dd-Version:
32
+ - 31.153-293-3859d5c
33
+ Content-Length:
34
+ - '315'
35
+ Connection:
36
+ - keep-alive
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! '{"notify_no_data": false, "event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0",
40
+ "state": "OK", "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
41
+ > 5", "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
42
+ > 5", "message": null, "creator": 3658, "timeout_h": null}'
43
+ http_version:
44
+ recorded_at: Tue, 27 Aug 2013 16:13:42 GMT
45
+ - request:
46
+ method: delete
47
+ uri: https://app.datadoghq.com/api/v1/alert/54314?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Accept:
53
+ - ! '*/*'
54
+ User-Agent:
55
+ - Ruby
56
+ response:
57
+ status:
58
+ code: 200
59
+ message: OK
60
+ headers:
61
+ Cache-Control:
62
+ - no-cache
63
+ Content-Type:
64
+ - application/json
65
+ Date:
66
+ - Thu, 08 May 2014 18:12:57 GMT
67
+ Pragma:
68
+ - no-cache
69
+ Server:
70
+ - gunicorn/0.17.4
71
+ Set-Cookie:
72
+ - user={"org":{"id":1499,"time_zone":null},"_type":"User","id":3658,"time_zone":null};
73
+ Path=/
74
+ X-Dd-Version:
75
+ - 31.1102.1335-0
76
+ Content-Length:
77
+ - '344'
78
+ Connection:
79
+ - keep-alive
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! '{"event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0", "timeout_h":
83
+ null, "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
84
+ > 5", "message": null, "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
85
+ > 5", "silenced_timeout_ts": null, "creator": 3658, "notify_no_data": false,
86
+ "state": "OK"}'
87
+ http_version:
88
+ recorded_at: Thu, 08 May 2014 18:08:34 GMT
3
89
  - request:
4
90
  method: post
5
91
  uri: https://app.datadoghq.com/api/v1/alert?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
@@ -24,30 +110,32 @@ http_interactions:
24
110
  Content-Type:
25
111
  - application/json
26
112
  Date:
27
- - Tue, 27 Aug 2013 16:13:42 GMT
113
+ - Tue, 13 May 2014 19:48:03 GMT
28
114
  Pragma:
29
115
  - no-cache
30
116
  Server:
31
117
  - gunicorn/0.17.4
32
118
  Set-Cookie:
33
- - user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
119
+ - user={"org":{"id":1499,"time_zone":null},"_type":"User","id":3658,"time_zone":null};
120
+ Path=/
34
121
  X-Dd-Version:
35
- - 31.153-293-3859d5c
122
+ - 31.1129.1362-0
36
123
  Content-Length:
37
- - '328'
124
+ - '379'
38
125
  Connection:
39
126
  - keep-alive
40
127
  body:
41
128
  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": 37497, "timeout_h": null}'
129
+ string: ! '{"event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0", "notify_audit":
130
+ true, "timeout_h": null, "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
131
+ > 5", "message": null, "id": 57370, "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
132
+ > 5", "silenced_timeout_ts": null, "creator": 3658, "notify_no_data": false,
133
+ "state": "OK"}'
46
134
  http_version:
47
- recorded_at: Tue, 27 Aug 2013 16:13:41 GMT
135
+ recorded_at: Tue, 13 May 2014 19:48:03 GMT
48
136
  - request:
49
137
  method: delete
50
- uri: https://app.datadoghq.com/api/v1/alert/37497?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
138
+ uri: https://app.datadoghq.com/api/v1/alert/57370?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
51
139
  body:
52
140
  encoding: US-ASCII
53
141
  string: ''
@@ -66,25 +154,27 @@ http_interactions:
66
154
  Content-Type:
67
155
  - application/json
68
156
  Date:
69
- - Tue, 27 Aug 2013 16:13:42 GMT
157
+ - Tue, 13 May 2014 19:48:03 GMT
70
158
  Pragma:
71
159
  - no-cache
72
160
  Server:
73
161
  - gunicorn/0.17.4
74
162
  Set-Cookie:
75
- - user={"org":{"id":1499},"_type":"User","id":3658}; Path=/
163
+ - user={"org":{"id":1499,"time_zone":null},"_type":"User","id":3658,"time_zone":null};
164
+ Path=/
76
165
  X-Dd-Version:
77
- - 31.153-293-3859d5c
166
+ - 31.1129.1362-0
78
167
  Content-Length:
79
- - '315'
168
+ - '366'
80
169
  Connection:
81
170
  - keep-alive
82
171
  body:
83
172
  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}'
173
+ string: ! '{"event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0", "notify_audit":
174
+ true, "timeout_h": null, "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
175
+ > 5", "message": null, "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
176
+ > 5", "silenced_timeout_ts": null, "creator": 3658, "notify_no_data": false,
177
+ "state": "OK"}'
88
178
  http_version:
89
- recorded_at: Tue, 27 Aug 2013 16:13:42 GMT
90
- recorded_with: VCR 2.5.0
179
+ recorded_at: Tue, 13 May 2014 19:48:03 GMT
180
+ recorded_with: VCR 2.9.0