dogapi 1.21.0 → 1.22.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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +5 -2
  4. data/CHANGELOG.md +8 -3
  5. data/Gemfile +1 -0
  6. data/README.rdoc +22 -0
  7. data/Rakefile +2 -7
  8. data/lib/dogapi/facade.rb +10 -0
  9. data/lib/dogapi/v1/metric.rb +28 -3
  10. data/lib/dogapi/version.rb +1 -1
  11. data/spec/spec_helper.rb +3 -1
  12. data/spec/support/cassettes/Alerts/create/returns_HTTP_code_200.yml +39 -23
  13. data/spec/support/cassettes/Alerts/create/returns_a_valid_event_ID.yml +39 -153
  14. data/spec/support/cassettes/Alerts/create/returns_the_same_query_as_sent.yml +39 -153
  15. data/spec/support/cassettes/Facade/Events/emits_aggregate_events.yml +68 -264
  16. data/spec/support/cassettes/Facade/Events/emits_events_and_retrieves_them.yml +36 -153
  17. data/spec/support/cassettes/Facade/Events/emits_events_with_specified_priority.yml +34 -149
  18. data/spec/support/cassettes/Facade/Tags/adds_updates_and_detaches_tags.yml +132 -66
  19. data/tests/test_alerts.rb +1 -1
  20. data/tests/test_base.rb +1 -1
  21. data/tests/test_client.rb +1 -1
  22. data/tests/test_comments.rb +1 -1
  23. data/tests/test_dashes.rb +1 -1
  24. data/tests/test_embed.rb +2 -2
  25. data/tests/test_monitors.rb +1 -1
  26. data/tests/test_screenboard.rb +2 -2
  27. data/tests/test_search.rb +1 -1
  28. data/tests/test_snapshot.rb +1 -1
  29. data/tests/test_users.rb +1 -1
  30. metadata +21 -32
  31. data/spec/support/cassettes/Alerts/create/returns_HTTP_code_201.yml +0 -191
  32. data/spec/support/cassettes/Facade/Client/emit_point_can_pass_nil_host.yml +0 -32
  33. data/spec/support/cassettes/Facade/Client/emit_point_passes_data.yml +0 -32
  34. data/spec/support/cassettes/Facade/Client/emit_point_uses_localhost_default.yml +0 -32
  35. data/spec/support/cassettes/Facade/Client/emits_point_with_localhost.yml +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca850c71e9c22f3b3b5c8ddfa2eb6eda2174807e
4
- data.tar.gz: 4a6dff6932e1a05e3acb6a4af3dacd0cc3a1cf51
3
+ metadata.gz: 97fdf2da1be73b712ef0c63a980f060f12c4d39a
4
+ data.tar.gz: fb495d0a8975297a61d4f2155f8458b814de8f9b
5
5
  SHA512:
6
- metadata.gz: 5fe2e6a80a0a60cf838e235bf00e82675638783bd05cb63012d89d5cc5c6babf9873a012bd6bb075343073a3e35ef74af21d35e1244eb7f26c9cca401aec3ca7
7
- data.tar.gz: 34df781325d7bbdd49454e6e7681a932c8282d9992a74ae65d5725f1429d3aa39c91ff99a9fa884c4d02b95184dff5805cb68d4bee4b8b2f2e35bac2c84c2e6d
6
+ metadata.gz: a6724cf647a38a2edd41a01d4842c8c2d328ff7b4d2693209b42a102807abf27999f459e2b410d7c14917b6db188253fed41dd712a8282b44c7ae4e0b8e02641
7
+ data.tar.gz: 55a23e31d1fd28dc2b16b2f02d8429cd5253745935f7ff16b2f88f242c17148fa977860b16f67188df72b07d1823b4092a8bb82dd09c7c65e59d0974bb695b02
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  Gemfile.lock
8
8
  doc/
9
9
  pkg/
10
+ .idea
@@ -1,5 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 1.9.3
5
- - 2.0.0
4
+ - 2.1
5
+ - 2.2
6
+ - 2.3.0
7
+ env:
8
+ secure: hKn4OWJZ3gKvdGVZd5VTnpRb7GB5eEtF7qc0+zOwusL1bxxSXvuNTLecqvKZpDH5uCnRCx8Dz52hSA5KzNoBoH2dPhyeC8en4/gZWbxndHYg/2qFBeHO4FP/Li3B9DmZt247IkuzK1oI4k5GkFyVw7OVrjxSVb50hjbanddkkmg=
@@ -1,7 +1,10 @@
1
1
  Changes
2
2
  =======
3
3
 
4
- # 1.21.0 / Unreleased
4
+ # 1.22.0 / Unreleased
5
+ * [FEATURE] Metric query API. See [#88][], [#90][] (thanks [@blakehilscher][])
6
+
7
+ # 1.21.0 / 2015-10-30
5
8
  * [FEATURE] User CRUD API. See [#82][]
6
9
  * [IMPROVEMENT] Support capistrano SimpleTextFormatter (thanks [@rmoriz][] [#81][])
7
10
 
@@ -140,13 +143,15 @@ Changes
140
143
  [#73]: https://github.com/DataDog/dogapi-rb/issues/73
141
144
  [#81]: https://github.com/DataDog/dogapi-rb/issues/81
142
145
  [#82]: https://github.com/DataDog/dogapi-rb/issues/82
143
-
146
+ [#88]: https://github.com/DataDog/dogapi-rb/issues/88
147
+ [#90]: https://github.com/DataDog/dogapi-rb/issues/90
144
148
  [@ArjenSchwarz]: https://github.com/ArjenSchwarz
145
149
  [@Kaixiang]: https://github.com/Kaixiang
146
150
  [@ansel1]: https://github.com/ansel1
147
151
  [@arielo]: https://github.com/arielo
152
+ [@blakehilscher]: https://github.com/blakehilscher
148
153
  [@byroot]: https://github.com/byroot
154
+ [@rmoriz]: https://github.com/rmoriz
149
155
  [@treeder]: https://github.com/treeder
150
156
  [@winebarrel]: https://github.com/winebarrel
151
157
  [@yyuu]: https://github.com/yyuu
152
- [@rmoriz]: https://github.com/rmoriz
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :test do
6
+ gem 'minitest'
6
7
  gem 'rake', '>= 2.4.2'
7
8
  gem 'rdoc'
8
9
  gem 'rspec'
@@ -119,3 +119,25 @@ data point you will need to pass a list of +Time+, +float+ pairs, instead of a s
119
119
  dog = Dogapi::Client.new(api_key)
120
120
 
121
121
  dog.emit_points('some.metric.name', [[t1, val1], [t2, val2], [t3, val3]], :host => "my_host", :device => "my_device")
122
+
123
+
124
+ == Get points from a Datadog metric
125
+
126
+ require 'rubygems'
127
+ require 'dogapi'
128
+
129
+ api_key = "abcd123"
130
+ application_key = "brec1252"
131
+
132
+ dog = Dogapi::Client.new(api_key, application_key)
133
+
134
+ # get points from the last hour
135
+ from = Time.now - 3600
136
+ to = Time.now
137
+
138
+ query = 'sum:metric.count{*}.as_count()'
139
+
140
+ dog.get_points(from, to, query)
141
+
142
+
143
+
data/Rakefile CHANGED
@@ -3,17 +3,12 @@ require 'rake/testtask'
3
3
  require 'rdoc/task'
4
4
  require 'rspec/core/rake_task'
5
5
 
6
- # Assign some test keys if they aren't already set.
7
- ENV["DATADOG_API_KEY"] ||= '9775a026f1ca7d1c6c5af9d94d9595a4'
8
- ENV["DATADOG_APP_KEY"] ||= '87ce4a24b5553d2e482ea8a8500e71b8ad4554ff'
9
-
10
6
  default_tests = [:spec, :test]
11
7
 
12
8
  case RbConfig::CONFIG['ruby_version']
13
- when '1.8'
14
- # do nothing
9
+ when -> (version) { version.start_with?("2.3") }
10
+ # Not compatible with Ruby 2.3.x
15
11
  else
16
- # Since Tailor uses methods that don't exist in Ruby 1.8.7
17
12
  require 'tailor/rake_task'
18
13
  default_tests.unshift(:tailor)
19
14
 
@@ -91,6 +91,16 @@ module Dogapi
91
91
  @metric_svc.submit(metric, points, scope, options)
92
92
  end
93
93
 
94
+ # Get a set of points by query between from and to
95
+ #
96
+ # +from+ The seconds since the unix epoch <tt>[Time, Integer]</tt>
97
+ # +to+ The seconds since the unix epoch <tt>[Time, Integer]</tt>
98
+ # +query+ The query string <tt>[String]</tt>
99
+ #
100
+ def get_points(query, from, to)
101
+ @metric_svc.get(query, from, to)
102
+ end
103
+
94
104
  def batch_metrics()
95
105
  @metric_svc.switch_to_batched
96
106
  begin
@@ -8,6 +8,27 @@ module Dogapi
8
8
 
9
9
  API_VERSION = "v1"
10
10
 
11
+ def get(query, from, to)
12
+ begin
13
+ params = {
14
+ :api_key => @api_key,
15
+ :application_key => @application_key,
16
+
17
+ from: from.to_i,
18
+ to: to.to_i,
19
+ query: query
20
+ }
21
+ request(Net::HTTP::Get, '/api/' + API_VERSION + '/query', params, nil, false)
22
+ rescue Exception => e
23
+ if @silent
24
+ warn e
25
+ return -1, {}
26
+ else
27
+ raise e
28
+ end
29
+ end
30
+ end
31
+
11
32
  def upload(metrics)
12
33
  begin
13
34
  params = {
@@ -44,16 +65,20 @@ module Dogapi
44
65
  self.upload(payload)
45
66
  end
46
67
 
47
- alias :submit :submit_to_api
68
+ def submit(*args)
69
+ if @buffer
70
+ submit_to_buffer(*args)
71
+ else
72
+ submit_to_api(*args)
73
+ end
74
+ end
48
75
 
49
76
  def switch_to_batched()
50
- alias :submit :submit_to_buffer
51
77
  @buffer = Array.new
52
78
  end
53
79
 
54
80
  def switch_to_single()
55
81
  @buffer = nil
56
- alias :submit :submit_to_api
57
82
  end
58
83
 
59
84
  def make_metric_payload(metric, points, scope, options)
@@ -1,3 +1,3 @@
1
1
  module Dogapi
2
- VERSION = "1.21.0"
2
+ VERSION = "1.22.0"
3
3
  end
@@ -23,6 +23,8 @@ end
23
23
  VCR.configure do |c|
24
24
  c.cassette_library_dir = 'spec/support/cassettes'
25
25
  c.configure_rspec_metadata!
26
- c.default_cassette_options = { :record => :new_episodes, :re_record_interval => 2592000 } # 30 days, in seconds
26
+ c.default_cassette_options = { :record => :new_episodes, :re_record_interval => 7776000 } # 90 days, in seconds
27
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"] }
28
30
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app.datadoghq.com/api/v1/alert?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
5
+ uri: https://app.datadoghq.com/api/v1/alert?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
@@ -11,7 +11,7 @@ http_interactions:
11
11
  Accept-Encoding:
12
12
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13
13
  Accept:
14
- - '*/*'
14
+ - "*/*"
15
15
  User-Agent:
16
16
  - Ruby
17
17
  Content-Type:
@@ -26,32 +26,40 @@ http_interactions:
26
26
  Content-Type:
27
27
  - application/json; charset=utf-8
28
28
  Date:
29
- - Mon, 17 Nov 2014 18:26:23 GMT
29
+ - Mon, 11 Apr 2016 17:56:53 GMT
30
+ Dd-Pool:
31
+ - dogweb_sameorig
30
32
  Pragma:
31
33
  - no-cache
32
- Server:
33
- - gunicorn/19.1.0
34
+ Set-Cookie:
35
+ - DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:53 GMT"; Max-Age=604800; Path=/
34
36
  Strict-Transport-Security:
35
37
  - max-age=15724800;
36
38
  Vary:
37
39
  - Accept-Encoding
40
+ X-Content-Type-Options:
41
+ - nosniff
42
+ X-Dd-Debug:
43
+ - ODPlWrOS4MEcZXXD/7SPngU2RDdboMc4yDiHiqJBZz0=
38
44
  X-Dd-Version:
39
- - 31.1883.245-0
45
+ - '33.3404'
46
+ X-Frame-Options:
47
+ - SAMEORIGIN
40
48
  Content-Length:
41
- - '288'
49
+ - '298'
42
50
  Connection:
43
51
  - keep-alive
44
52
  body:
45
53
  encoding: UTF-8
46
- string: '{"event_object":"d709ad144fa2ddcc5daa4f866747a991","notify_audit":true,"timeout_h":null,"silenced":{},"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
47
- > 5","message":"","id":103961,"name":"**test.metric.metric** over **host:test.metric.host**
48
- was **> 5** on average during the **last 10m**.","no_data_timeframe":false,"creator":3658,"notify_no_data":false,"renotify_interval":null,"state":"No
49
- Data","escalation_message":""}'
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}'
50
58
  http_version:
51
- recorded_at: Mon, 17 Nov 2014 18:26:23 GMT
59
+ recorded_at: Mon, 11 Apr 2016 17:56:53 GMT
52
60
  - request:
53
61
  method: delete
54
- uri: https://app.datadoghq.com/api/v1/alert/103961?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
62
+ uri: https://app.datadoghq.com/api/v1/alert/552995?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
55
63
  body:
56
64
  encoding: US-ASCII
57
65
  string: ''
@@ -59,7 +67,7 @@ http_interactions:
59
67
  Accept-Encoding:
60
68
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
69
  Accept:
62
- - '*/*'
70
+ - "*/*"
63
71
  User-Agent:
64
72
  - Ruby
65
73
  response:
@@ -72,27 +80,35 @@ http_interactions:
72
80
  Content-Type:
73
81
  - application/json; charset=utf-8
74
82
  Date:
75
- - Mon, 17 Nov 2014 18:26:23 GMT
83
+ - Mon, 11 Apr 2016 17:56:53 GMT
84
+ Dd-Pool:
85
+ - dogweb_sameorig
76
86
  Pragma:
77
87
  - no-cache
78
- Server:
79
- - gunicorn/19.1.0
88
+ Set-Cookie:
89
+ - DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:53 GMT"; Max-Age=604800; Path=/
80
90
  Strict-Transport-Security:
81
91
  - max-age=15724800;
82
92
  Vary:
83
93
  - Accept-Encoding
94
+ X-Content-Type-Options:
95
+ - nosniff
96
+ X-Dd-Debug:
97
+ - avwu1L56XulIB/cxbiNxDBj6ZA7aKJvxR5yfoq2OTaw=
84
98
  X-Dd-Version:
85
- - 31.1883.245-0
99
+ - '33.3404'
100
+ X-Frame-Options:
101
+ - SAMEORIGIN
86
102
  Content-Length:
87
- - '279'
103
+ - '288'
88
104
  Connection:
89
105
  - keep-alive
90
106
  body:
91
107
  encoding: UTF-8
92
- string: '{"event_object":"d709ad144fa2ddcc5daa4f866747a991","notify_audit":true,"timeout_h":null,"silenced":{},"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
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}
93
109
  > 5","message":"","name":"**test.metric.metric** over **host:test.metric.host**
94
- was **> 5** on average during the **last 10m**.","no_data_timeframe":false,"creator":3658,"notify_no_data":false,"renotify_interval":null,"state":"No
95
- Data","escalation_message":""}'
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}'
96
112
  http_version:
97
- recorded_at: Mon, 17 Nov 2014 18:26:23 GMT
113
+ recorded_at: Mon, 11 Apr 2016 17:56:53 GMT
98
114
  recorded_with: VCR 2.9.3
@@ -1,138 +1,8 @@
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": null,
83
- "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
89
- - request:
90
- method: delete
91
- uri: https://app.datadoghq.com/api/v1/alert/57370?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
92
- body:
93
- encoding: US-ASCII
94
- string: ''
95
- headers:
96
- Accept:
97
- - '*/*'
98
- User-Agent:
99
- - Ruby
100
- response:
101
- status:
102
- code: 200
103
- message: OK
104
- headers:
105
- Cache-Control:
106
- - no-cache
107
- Content-Type:
108
- - application/json
109
- Date:
110
- - Tue, 13 May 2014 19:48:03 GMT
111
- Pragma:
112
- - no-cache
113
- Server:
114
- - gunicorn/0.17.4
115
- Set-Cookie:
116
- - user={"org":{"id":1499,"time_zone":null},"_type":"User","id":3658,"time_zone":null};
117
- Path=/
118
- X-Dd-Version:
119
- - 31.1129.1362-0
120
- Content-Length:
121
- - '366'
122
- Connection:
123
- - keep-alive
124
- body:
125
- encoding: US-ASCII
126
- string: '{"event_object": "6bc5a22ffc9d267c3cd6eb3ad79623e0", "notify_audit":
127
- true, "timeout_h": null, "silenced": false, "query": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
128
- > 5", "message": null, "name": "avg(last_10m):avg:test.metric.metric{host:test.metric.host}
129
- > 5", "silenced_timeout_ts": null, "creator": 3658, "notify_no_data": false,
130
- "state": "OK"}'
131
- http_version:
132
- recorded_at: Tue, 13 May 2014 19:48:03 GMT
133
3
  - request:
134
4
  method: post
135
- uri: https://app.datadoghq.com/api/v1/alert?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
5
+ uri: https://app.datadoghq.com/api/v1/alert?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
136
6
  body:
137
7
  encoding: UTF-8
138
8
  string: '{"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
@@ -141,7 +11,7 @@ http_interactions:
141
11
  Accept-Encoding:
142
12
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
143
13
  Accept:
144
- - '*/*'
14
+ - "*/*"
145
15
  User-Agent:
146
16
  - Ruby
147
17
  Content-Type:
@@ -156,32 +26,40 @@ http_interactions:
156
26
  Content-Type:
157
27
  - application/json; charset=utf-8
158
28
  Date:
159
- - Mon, 17 Nov 2014 18:26:22 GMT
29
+ - Mon, 11 Apr 2016 17:56:52 GMT
30
+ Dd-Pool:
31
+ - dogweb_sameorig
160
32
  Pragma:
161
33
  - no-cache
162
- Server:
163
- - gunicorn/19.1.0
34
+ Set-Cookie:
35
+ - DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:52 GMT"; Max-Age=604800; Path=/
164
36
  Strict-Transport-Security:
165
37
  - max-age=15724800;
166
38
  Vary:
167
39
  - Accept-Encoding
40
+ X-Content-Type-Options:
41
+ - nosniff
42
+ X-Dd-Debug:
43
+ - omuZE5ldmS3gykYWzeRNmM1P8lUKatqFhRFlclaYIlg=
168
44
  X-Dd-Version:
169
- - 31.1883.245-0
45
+ - '33.3404'
46
+ X-Frame-Options:
47
+ - SAMEORIGIN
170
48
  Content-Length:
171
- - '288'
49
+ - '297'
172
50
  Connection:
173
51
  - keep-alive
174
52
  body:
175
53
  encoding: UTF-8
176
- string: '{"event_object":"d709ad144fa2ddcc5daa4f866747a991","notify_audit":true,"timeout_h":null,"silenced":{},"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
177
- > 5","message":"","id":103960,"name":"**test.metric.metric** over **host:test.metric.host**
178
- was **> 5** on average during the **last 10m**.","no_data_timeframe":false,"creator":3658,"notify_no_data":false,"renotify_interval":null,"state":"No
179
- Data","escalation_message":""}'
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}'
180
58
  http_version:
181
- recorded_at: Mon, 17 Nov 2014 18:26:22 GMT
59
+ recorded_at: Mon, 11 Apr 2016 17:56:52 GMT
182
60
  - request:
183
61
  method: delete
184
- uri: https://app.datadoghq.com/api/v1/alert/103960?api_key=9775a026f1ca7d1c6c5af9d94d9595a4&application_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
62
+ uri: https://app.datadoghq.com/api/v1/alert/552994?api_key=<DATADOG_API_KEY>&application_key=<DATADOG_APP_KEY>
185
63
  body:
186
64
  encoding: US-ASCII
187
65
  string: ''
@@ -189,7 +67,7 @@ http_interactions:
189
67
  Accept-Encoding:
190
68
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
191
69
  Accept:
192
- - '*/*'
70
+ - "*/*"
193
71
  User-Agent:
194
72
  - Ruby
195
73
  response:
@@ -202,27 +80,35 @@ http_interactions:
202
80
  Content-Type:
203
81
  - application/json; charset=utf-8
204
82
  Date:
205
- - Mon, 17 Nov 2014 18:26:22 GMT
83
+ - Mon, 11 Apr 2016 17:56:53 GMT
84
+ Dd-Pool:
85
+ - dogweb_sameorig
206
86
  Pragma:
207
87
  - no-cache
208
- Server:
209
- - gunicorn/19.1.0
88
+ Set-Cookie:
89
+ - DD-PSHARD=0; expires="Mon, 18-Apr-2016 17:56:52 GMT"; Max-Age=604800; Path=/
210
90
  Strict-Transport-Security:
211
91
  - max-age=15724800;
212
92
  Vary:
213
93
  - Accept-Encoding
94
+ X-Content-Type-Options:
95
+ - nosniff
96
+ X-Dd-Debug:
97
+ - Bj/SqNU1vbZGxNGffIRtmaWe7MKGSPoKHC3+ZhLAjqk=
214
98
  X-Dd-Version:
215
- - 31.1883.245-0
99
+ - '33.3404'
100
+ X-Frame-Options:
101
+ - SAMEORIGIN
216
102
  Content-Length:
217
- - '279'
103
+ - '288'
218
104
  Connection:
219
105
  - keep-alive
220
106
  body:
221
107
  encoding: UTF-8
222
- string: '{"event_object":"d709ad144fa2ddcc5daa4f866747a991","notify_audit":true,"timeout_h":null,"silenced":{},"query":"avg(last_10m):avg:test.metric.metric{host:test.metric.host}
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}
223
109
  > 5","message":"","name":"**test.metric.metric** over **host:test.metric.host**
224
- was **> 5** on average during the **last 10m**.","no_data_timeframe":false,"creator":3658,"notify_no_data":false,"renotify_interval":null,"state":"No
225
- Data","escalation_message":""}'
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}'
226
112
  http_version:
227
- recorded_at: Mon, 17 Nov 2014 18:26:22 GMT
113
+ recorded_at: Mon, 11 Apr 2016 17:56:53 GMT
228
114
  recorded_with: VCR 2.9.3