chef-handler-datadog 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +8 -8
  2. data/.travis.yml +7 -0
  3. data/Appraisals +2 -0
  4. data/CHANGELOG.md +5 -0
  5. data/gemfiles/chef_11.16.0.gemfile +16 -0
  6. data/gemfiles/chef_12.0.0.alpha.1.gemfile +16 -0
  7. data/lib/chef/handler/datadog.rb +8 -4
  8. data/lib/chef_handler_datadog.rb +1 -1
  9. data/spec/datadog_spec.rb +1 -0
  10. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +43 -41
  11. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +23 -22
  12. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +20 -19
  13. data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +19 -18
  14. data/spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml +22 -21
  15. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +20 -20
  16. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +21 -21
  17. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml +20 -20
  18. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +20 -20
  19. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +20 -20
  20. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +20 -20
  21. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +23 -23
  22. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +21 -21
  23. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml +22 -22
  24. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/does_not_emit_metrics.yml +12 -11
  25. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml +13 -12
  26. data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +20 -20
  27. metadata +4 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2VjMTZmYjcxMGU0ZTk3MTZkNWM3NzYzNWU1Y2VlMjI5ZjI4MGQ4Zg==
4
+ ZjkzOTQ0NTMxMmMyNDkyZDg1NTI4YmZjYzc1ODk4ZDI4ZGFlOTNkMg==
5
5
  data.tar.gz: !binary |-
6
- ZGE2NGJjZjYwMGQ1MDczZjhlYjM5Yjg5N2ZmODU5NzYzN2EzMDBkYQ==
6
+ MjlhNGU4MjZjYTZiZTFlMDEyMmFmOThlMjcyZjcyZTNhODAzOWM5NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2UwYTVkMTc3MzE0ZjFhMTM3ZDQ5YjcwMDg2NTM1MTQwMDY1YmIwMGY0OWI2
10
- N2IxZmFhZTFiMTI2YjljYTA2ODJhOTlhZTkwZjMwN2Y5Y2Q1NmM5MGY4YmE3
11
- ZTllNTZhZjFhODAzYjJiYTJjODY5YmM2ZWQxYjNlODhjOWZlNzc=
9
+ ZDcyMGViMDc4YTNmN2MyNDVkZTRmODY0OWRhZWQ5MzVkMGEyMzAzZjViOTIw
10
+ MWY0NDg2YjZlYmVlYTVmZjEyODI1MWNhOGI0NDM3MzNmNGFiNzNmZDA4ZGRj
11
+ NDA1YThjMjliMzg3MGE2ZDQ2MmM1MDg0OWI0YWQ5MWFkY2YwNTk=
12
12
  data.tar.gz: !binary |-
13
- Y2Q5MjczZDBiYmM5MTg3YzNkMzcyYTBlNzkxZWUwMTk3MGQ1NzEzM2ZiOTJi
14
- ZTQ0MjQ2MjM0NWY3MjUzMTQzOTM2ODFhOTcyOGQ2Njg5Mjg2MDczZDA4M2Vi
15
- YjdhYTNiMmY1Y2FiNjE4YzliNDVlYmFhOGJhNzdkMTZmMDcxYWM=
13
+ Y2I2MmZhNzY0MWQ0YmEwNGE4ODZlOGY5YzM1NDhhZjczYWFkYjIxOTUxYWY2
14
+ NmNjODE0NmVjNDkxOGU1NDk4NjBmMjY3NmM1OTdlOTdlZGY0ZWMxY2U4NGJm
15
+ NTFlYTllY2I3M2E3M2I4ZDI0MzA4YzhjYTJhNjc3ZmQ2Y2Q0ODE=
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
+ - 2.1.2
4
5
  bundler_args: --without=localdev
5
6
  gemfile:
6
7
  - gemfiles/chef_10.26.0.gemfile
@@ -9,5 +10,11 @@ gemfile:
9
10
  - gemfiles/chef_11.10.4.gemfile
10
11
  - gemfiles/chef_11.12.8.gemfile
11
12
  - gemfiles/chef_11.14.2.gemfile
13
+ - gemfiles/chef_11.16.0.gemfile
14
+ - gemfiles/chef_12.0.0.alpha.1.gemfile
12
15
  env:
13
16
  - API_KEY=somefakeapikey APPLICATION_KEY=somefakeapplicationkey
17
+ matrix:
18
+ allow_failures:
19
+ - rvm: 2.1.2
20
+ - gemfile: gemfiles/chef_12.0.0.alpha.1.gemfile
data/Appraisals CHANGED
@@ -6,6 +6,8 @@
6
6
  11.10.4
7
7
  11.12.8
8
8
  11.14.2
9
+ 11.16.0
10
+ 12.0.0.alpha.1
9
11
  ).each do |tv|
10
12
  appraise "chef-#{tv}" do
11
13
  gem 'chef', tv
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ # 0.6.0 / 2014-09-17
5
+
6
+ * [FEATURE] Submit Chef-related tags to Datadog for Events, [#52][] [@miketheman][]
7
+
4
8
  # 0.5.0 / 2014-08-21
5
9
 
6
10
  * [FEATURE] Place recent updated resources above stacktrace on failure, [#46][] [@miketheman][]
@@ -57,6 +61,7 @@ And all other versions were prior to this. See git history for more.
57
61
  [#46]: https://github.com/DataDog/chef-handler-datadog/issues/46
58
62
  [#50]: https://github.com/DataDog/chef-handler-datadog/issues/50
59
63
  [#51]: https://github.com/DataDog/chef-handler-datadog/issues/51
64
+ [#52]: https://github.com/DataDog/chef-handler-datadog/issues/52
60
65
  [@alq]: https://github.com/alq
61
66
  [@dwradcliffe]: https://github.com/dwradcliffe
62
67
  [@miketheman]: https://github.com/miketheman
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "chef", "11.16.0"
6
+
7
+ group :localdev do
8
+ gem "guard"
9
+ gem "guard-rspec"
10
+ gem "guard-rubocop"
11
+ gem "pry"
12
+ gem "terminal-notifier-guard"
13
+ gem "travis-lint"
14
+ end
15
+
16
+ gemspec :path => "../"
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "chef", "12.0.0.alpha.1"
6
+
7
+ group :localdev do
8
+ gem "guard"
9
+ gem "guard-rspec"
10
+ gem "guard-rubocop"
11
+ gem "pry"
12
+ gem "terminal-notifier-guard"
13
+ gem "travis-lint"
14
+ end
15
+
16
+ gemspec :path => "../"
@@ -31,8 +31,11 @@ class Chef
31
31
 
32
32
  # Submit the details back to Datadog
33
33
  begin
34
+ # Collect tags
35
+ new_host_tags = get_combined_tags(node)
36
+
34
37
  # Send the Event data
35
- emit_event_to_datadog(hostname, event_data)
38
+ emit_event_to_datadog(hostname, event_data, new_host_tags)
36
39
 
37
40
  # Update tags
38
41
  if config[:application_key].nil?
@@ -42,7 +45,6 @@ class Chef
42
45
  )
43
46
  fail ArgumentError, 'Missing Datadog Application Key'
44
47
  else
45
- new_host_tags = get_combined_tags(node)
46
48
 
47
49
  # Replace all Chef tags with the found Chef tags
48
50
  rc = @dog.update_tags(hostname, new_host_tags, 'chef')
@@ -148,7 +150,8 @@ class Chef
148
150
  #
149
151
  # @param hostname [String] resolved hostname to attach to Event
150
152
  # @param event_params [Array] all the configurables to build a valid Event
151
- def emit_event_to_datadog(hostname, event_data)
153
+ # @param tags [Array] Chef env/roles/tags to be set as Datadog tags
154
+ def emit_event_to_datadog(hostname, event_data, tags)
152
155
  alert_type, event_priority, event_title, event_body = event_data
153
156
 
154
157
  evt = @dog.emit_event(Dogapi::Event.new(event_body,
@@ -157,7 +160,8 @@ class Chef
157
160
  :event_object => hostname,
158
161
  :alert_type => alert_type,
159
162
  :priority => event_priority,
160
- :source_type_name => 'chef'
163
+ :source_type_name => 'chef',
164
+ :tags => tags
161
165
  ), :host => hostname)
162
166
 
163
167
  begin
@@ -2,5 +2,5 @@
2
2
  # Helper module for version number only.
3
3
  # Real deal in 'chef/handler/datadog.rb'
4
4
  module ChefHandlerDatadog
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.0'
6
6
  end
data/spec/datadog_spec.rb CHANGED
@@ -66,6 +66,7 @@ describe Chef::Handler::Datadog, :vcr => :new_episodes do
66
66
  :query => { 'api_key' => @handler.config[:api_key] },
67
67
  :body => hash_including(:msg_text => 'Chef updated 0 resources out of 0 resources total.'),
68
68
  :body => hash_including(:msg_title => "Chef completed in 5 seconds on #{@node.name} "),
69
+ :body => hash_including(:tags => ['env:testing']),
69
70
  )).to have_been_made.times(1)
70
71
  end
71
72
 
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
6
6
  body:
7
7
  encoding: UTF-8
8
- string: ! '{"series":[{"metric":"chef.resources.total","points":[[1408567936,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
8
+ string: ! '{"series":[{"metric":"chef.resources.total","points":[[1410264911,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
9
9
  headers:
10
10
  Accept:
11
11
  - ! '*/*'
@@ -21,9 +21,9 @@ http_interactions:
21
21
  Content-Type:
22
22
  - text/json; charset=UTF-8
23
23
  Date:
24
- - Wed, 20 Aug 2014 20:52:14 GMT
24
+ - Tue, 09 Sep 2014 12:15:09 GMT
25
25
  Server:
26
- - dogdispatcher/5.1.1
26
+ - dogdispatcher/5.2.0
27
27
  Content-Length:
28
28
  - '15'
29
29
  Connection:
@@ -32,13 +32,13 @@ http_interactions:
32
32
  encoding: US-ASCII
33
33
  string: ! '{"status":"ok"}'
34
34
  http_version:
35
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
35
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
36
36
  - request:
37
37
  method: post
38
38
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
39
39
  body:
40
40
  encoding: UTF-8
41
- string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1408567936,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
41
+ string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1410264911,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
42
42
  headers:
43
43
  Accept:
44
44
  - ! '*/*'
@@ -54,7 +54,7 @@ http_interactions:
54
54
  Content-Type:
55
55
  - text/json; charset=UTF-8
56
56
  Date:
57
- - Wed, 20 Aug 2014 20:52:15 GMT
57
+ - Tue, 09 Sep 2014 12:15:09 GMT
58
58
  Server:
59
59
  - dogdispatcher/5.1.1
60
60
  Content-Length:
@@ -65,13 +65,13 @@ http_interactions:
65
65
  encoding: US-ASCII
66
66
  string: ! '{"status":"ok"}'
67
67
  http_version:
68
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
68
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
69
69
  - request:
70
70
  method: post
71
71
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
72
72
  body:
73
73
  encoding: UTF-8
74
- string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1408567936,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
74
+ string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1410264911,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
75
75
  headers:
76
76
  Accept:
77
77
  - ! '*/*'
@@ -87,7 +87,7 @@ http_interactions:
87
87
  Content-Type:
88
88
  - text/json; charset=UTF-8
89
89
  Date:
90
- - Wed, 20 Aug 2014 20:52:15 GMT
90
+ - Tue, 09 Sep 2014 12:15:10 GMT
91
91
  Server:
92
92
  - dogdispatcher/5.1.1
93
93
  Content-Length:
@@ -98,7 +98,7 @@ http_interactions:
98
98
  encoding: US-ASCII
99
99
  string: ! '{"status":"ok"}'
100
100
  http_version:
101
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
101
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
102
102
  - request:
103
103
  method: post
104
104
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
@@ -107,8 +107,8 @@ http_interactions:
107
107
  string: ! '{"msg_text":"Chef updated 6 resources out of 6 resources total.\n$$$\n-
108
108
  [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
109
109
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
110
- Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1408567936,"msg_title":"Chef
111
- failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
110
+ Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1410264911,"msg_title":"Chef
111
+ failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
112
112
  failed in 2 seconds on chef.handler.datadog.test-failed ","text":"Chef updated
113
113
  6 resources out of 6 resources total.\n$$$\n- [paws] (dynamically defined)\n-
114
114
  [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically
@@ -129,25 +129,26 @@ http_interactions:
129
129
  Content-Type:
130
130
  - text/json; charset=UTF-8
131
131
  Date:
132
- - Wed, 20 Aug 2014 20:52:16 GMT
132
+ - Tue, 09 Sep 2014 12:15:11 GMT
133
133
  Server:
134
- - dogdispatcher/5.1.1
134
+ - dogdispatcher/5.2.0
135
135
  Content-Length:
136
- - '673'
136
+ - '729'
137
137
  Connection:
138
138
  - keep-alive
139
139
  body:
140
140
  encoding: US-ASCII
141
141
  string: ! '{"status": "ok", "event": {"priority": "normal", "date_happened":
142
- 1408567936, "handle": null, "title": "Chef failed in 2 seconds on chef.handler.datadog.test-failed
143
- ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2421037339150571384",
142
+ 1410264911, "handle": null, "title": "Chef failed in 2 seconds on chef.handler.datadog.test-failed
143
+ ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507845826654380",
144
144
  "text": "Chef updated 6 resources out of 6 resources total.\n$$$\n- [paws]
145
145
  (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
146
146
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
147
147
  Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n",
148
- "tags": [], "related_event_id": null, "id": 2421037339150571384}}'
148
+ "tags": ["env:hostile", "role:highlander", "tag:the_one_and_only"], "related_event_id":
149
+ null, "id": 2449507845826654380}}'
149
150
  http_version:
150
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
151
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
151
152
  - request:
152
153
  method: put
153
154
  uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
@@ -171,7 +172,7 @@ http_interactions:
171
172
  Content-Type:
172
173
  - application/json
173
174
  Date:
174
- - Wed, 20 Aug 2014 20:52:17 GMT
175
+ - Tue, 09 Sep 2014 12:15:11 GMT
175
176
  Pragma:
176
177
  - no-cache
177
178
  Server:
@@ -185,13 +186,13 @@ http_interactions:
185
186
  string: ! '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
186
187
  "role:highlander", "tag:the_one_and_only"]}'
187
188
  http_version:
188
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
189
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
189
190
  - request:
190
191
  method: post
191
192
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
192
193
  body:
193
194
  encoding: UTF-8
194
- string: ! '{"series":[{"metric":"chef.resources.total","points":[[1408567936,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
195
+ string: ! '{"series":[{"metric":"chef.resources.total","points":[[1410264911,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
195
196
  headers:
196
197
  Accept:
197
198
  - ! '*/*'
@@ -207,7 +208,7 @@ http_interactions:
207
208
  Content-Type:
208
209
  - text/json; charset=UTF-8
209
210
  Date:
210
- - Wed, 20 Aug 2014 20:52:17 GMT
211
+ - Tue, 09 Sep 2014 12:15:12 GMT
211
212
  Server:
212
213
  - dogdispatcher/5.1.1
213
214
  Content-Length:
@@ -218,13 +219,13 @@ http_interactions:
218
219
  encoding: US-ASCII
219
220
  string: ! '{"status":"ok"}'
220
221
  http_version:
221
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
222
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
222
223
  - request:
223
224
  method: post
224
225
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
225
226
  body:
226
227
  encoding: UTF-8
227
- string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1408567936,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
228
+ string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1410264911,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
228
229
  headers:
229
230
  Accept:
230
231
  - ! '*/*'
@@ -240,7 +241,7 @@ http_interactions:
240
241
  Content-Type:
241
242
  - text/json; charset=UTF-8
242
243
  Date:
243
- - Wed, 20 Aug 2014 20:52:18 GMT
244
+ - Tue, 09 Sep 2014 12:15:12 GMT
244
245
  Server:
245
246
  - dogdispatcher/5.1.1
246
247
  Content-Length:
@@ -251,13 +252,13 @@ http_interactions:
251
252
  encoding: US-ASCII
252
253
  string: ! '{"status":"ok"}'
253
254
  http_version:
254
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
255
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
255
256
  - request:
256
257
  method: post
257
258
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
258
259
  body:
259
260
  encoding: UTF-8
260
- string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1408567936,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
261
+ string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1410264911,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
261
262
  headers:
262
263
  Accept:
263
264
  - ! '*/*'
@@ -273,7 +274,7 @@ http_interactions:
273
274
  Content-Type:
274
275
  - text/json; charset=UTF-8
275
276
  Date:
276
- - Wed, 20 Aug 2014 20:52:19 GMT
277
+ - Tue, 09 Sep 2014 12:15:13 GMT
277
278
  Server:
278
279
  - dogdispatcher/5.1.1
279
280
  Content-Length:
@@ -284,7 +285,7 @@ http_interactions:
284
285
  encoding: US-ASCII
285
286
  string: ! '{"status":"ok"}'
286
287
  http_version:
287
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
288
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
288
289
  - request:
289
290
  method: post
290
291
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
@@ -293,8 +294,8 @@ http_interactions:
293
294
  string: ! '{"msg_text":"Chef updated 6 resources out of 6 resources total.\n$$$\n-
294
295
  [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
295
296
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\nAlerting:
296
- @alice @bob\n\n$$$\nChef::Exceptions::UnsupportedAction: Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1408567936,"msg_title":"Chef
297
- failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
297
+ @alice @bob\n\n$$$\nChef::Exceptions::UnsupportedAction: Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1410264911,"msg_title":"Chef
298
+ failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
298
299
  failed in 2 seconds on chef.handler.datadog.test-failed ","text":"Chef updated
299
300
  6 resources out of 6 resources total.\n$$$\n- [paws] (dynamically defined)\n-
300
301
  [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically
@@ -315,25 +316,26 @@ http_interactions:
315
316
  Content-Type:
316
317
  - text/json; charset=UTF-8
317
318
  Date:
318
- - Wed, 20 Aug 2014 20:52:19 GMT
319
+ - Tue, 09 Sep 2014 12:15:13 GMT
319
320
  Server:
320
- - dogdispatcher/5.1.1
321
+ - dogdispatcher/5.2.0
321
322
  Content-Length:
322
- - '698'
323
+ - '758'
323
324
  Connection:
324
325
  - keep-alive
325
326
  body:
326
327
  encoding: US-ASCII
327
328
  string: ! '{"status": "ok", "event": {"priority": "normal", "date_happened":
328
- 1408567936, "handle": null, "title": "Chef failed in 2 seconds on chef.handler.datadog.test-failed
329
- ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2421037393928238902",
329
+ 1410264911, "handle": null, "title": "Chef failed in 2 seconds on chef.handler.datadog.test-failed
330
+ ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507892182102265",
330
331
  "text": "Chef updated 6 resources out of 6 resources total.\n$$$\n- [paws]
331
332
  (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
332
333
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\nAlerting:
333
334
  @alice @bob\n\n$$$\nChef::Exceptions::UnsupportedAction: Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n",
334
- "tags": [], "related_event_id": null, "id": 2421037393928238902}}'
335
+ "tags": ["env:hostile", "role:highlander", "tag:tag:the_one_and_only"], "related_event_id":
336
+ null, "id": 2449507892182102265}}'
335
337
  http_version:
336
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
338
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
337
339
  - request:
338
340
  method: put
339
341
  uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
@@ -357,7 +359,7 @@ http_interactions:
357
359
  Content-Type:
358
360
  - application/json
359
361
  Date:
360
- - Wed, 20 Aug 2014 20:52:20 GMT
362
+ - Tue, 09 Sep 2014 12:15:14 GMT
361
363
  Pragma:
362
364
  - no-cache
363
365
  Server:
@@ -371,5 +373,5 @@ http_interactions:
371
373
  string: ! '{"host": "chef.handler.datadog.test-failed", "tags": ["tag:tag:the_one_and_only",
372
374
  "env:hostile", "role:highlander"]}'
373
375
  http_version:
374
- recorded_at: Wed, 20 Aug 2014 20:52:16 GMT
376
+ recorded_at: Tue, 09 Sep 2014 12:15:11 GMT
375
377
  recorded_with: VCR 2.9.2
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
6
6
  body:
7
7
  encoding: UTF-8
8
- string: ! '{"series":[{"metric":"chef.resources.total","points":[[1408567933,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
8
+ string: ! '{"series":[{"metric":"chef.resources.total","points":[[1410264905,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
9
9
  headers:
10
10
  Accept:
11
11
  - ! '*/*'
@@ -21,9 +21,9 @@ http_interactions:
21
21
  Content-Type:
22
22
  - text/json; charset=UTF-8
23
23
  Date:
24
- - Wed, 20 Aug 2014 20:52:12 GMT
24
+ - Tue, 09 Sep 2014 12:15:04 GMT
25
25
  Server:
26
- - dogdispatcher/5.1.1
26
+ - dogdispatcher/5.2.0
27
27
  Content-Length:
28
28
  - '15'
29
29
  Connection:
@@ -32,13 +32,13 @@ http_interactions:
32
32
  encoding: US-ASCII
33
33
  string: ! '{"status":"ok"}'
34
34
  http_version:
35
- recorded_at: Wed, 20 Aug 2014 20:52:13 GMT
35
+ recorded_at: Tue, 09 Sep 2014 12:15:05 GMT
36
36
  - request:
37
37
  method: post
38
38
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
39
39
  body:
40
40
  encoding: UTF-8
41
- string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1408567933,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
41
+ string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1410264905,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
42
42
  headers:
43
43
  Accept:
44
44
  - ! '*/*'
@@ -54,9 +54,9 @@ http_interactions:
54
54
  Content-Type:
55
55
  - text/json; charset=UTF-8
56
56
  Date:
57
- - Wed, 20 Aug 2014 20:52:12 GMT
57
+ - Tue, 09 Sep 2014 12:15:04 GMT
58
58
  Server:
59
- - dogdispatcher/5.1.1
59
+ - dogdispatcher/5.2.0
60
60
  Content-Length:
61
61
  - '15'
62
62
  Connection:
@@ -65,13 +65,13 @@ http_interactions:
65
65
  encoding: US-ASCII
66
66
  string: ! '{"status":"ok"}'
67
67
  http_version:
68
- recorded_at: Wed, 20 Aug 2014 20:52:13 GMT
68
+ recorded_at: Tue, 09 Sep 2014 12:15:05 GMT
69
69
  - request:
70
70
  method: post
71
71
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
72
72
  body:
73
73
  encoding: UTF-8
74
- string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1408567933,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
74
+ string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1410264905,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
75
75
  headers:
76
76
  Accept:
77
77
  - ! '*/*'
@@ -87,9 +87,9 @@ http_interactions:
87
87
  Content-Type:
88
88
  - text/json; charset=UTF-8
89
89
  Date:
90
- - Wed, 20 Aug 2014 20:52:13 GMT
90
+ - Tue, 09 Sep 2014 12:15:05 GMT
91
91
  Server:
92
- - dogdispatcher/5.1.1
92
+ - dogdispatcher/5.2.0
93
93
  Content-Length:
94
94
  - '15'
95
95
  Connection:
@@ -98,7 +98,7 @@ http_interactions:
98
98
  encoding: US-ASCII
99
99
  string: ! '{"status":"ok"}'
100
100
  http_version:
101
- recorded_at: Wed, 20 Aug 2014 20:52:13 GMT
101
+ recorded_at: Tue, 09 Sep 2014 12:15:05 GMT
102
102
  - request:
103
103
  method: post
104
104
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
@@ -107,8 +107,8 @@ http_interactions:
107
107
  string: ! '{"msg_text":"Chef updated 6 resources out of 6 resources total.\n$$$\n-
108
108
  [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
109
109
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
110
- Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1408567933,"msg_title":"Chef
111
- failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
110
+ Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1410264905,"msg_title":"Chef
111
+ failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
112
112
  failed in 2 seconds on chef.handler.datadog.test-failed ","text":"Chef updated
113
113
  6 resources out of 6 resources total.\n$$$\n- [paws] (dynamically defined)\n-
114
114
  [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically
@@ -129,25 +129,26 @@ http_interactions:
129
129
  Content-Type:
130
130
  - text/json; charset=UTF-8
131
131
  Date:
132
- - Wed, 20 Aug 2014 20:52:13 GMT
132
+ - Tue, 09 Sep 2014 12:15:05 GMT
133
133
  Server:
134
134
  - dogdispatcher/5.1.1
135
135
  Content-Length:
136
- - '673'
136
+ - '729'
137
137
  Connection:
138
138
  - keep-alive
139
139
  body:
140
140
  encoding: US-ASCII
141
141
  string: ! '{"status": "ok", "event": {"priority": "normal", "date_happened":
142
- 1408567933, "handle": null, "title": "Chef failed in 2 seconds on chef.handler.datadog.test-failed
143
- ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2421037292929640262",
142
+ 1410264905, "handle": null, "title": "Chef failed in 2 seconds on chef.handler.datadog.test-failed
143
+ ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507757931012345",
144
144
  "text": "Chef updated 6 resources out of 6 resources total.\n$$$\n- [paws]
145
145
  (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
146
146
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
147
147
  Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n",
148
- "tags": [], "related_event_id": null, "id": 2421037292929640262}}'
148
+ "tags": ["env:hostile", "role:highlander", "tag:the_one_and_only"], "related_event_id":
149
+ null, "id": 2449507757931012345}}'
149
150
  http_version:
150
- recorded_at: Wed, 20 Aug 2014 20:52:13 GMT
151
+ recorded_at: Tue, 09 Sep 2014 12:15:05 GMT
151
152
  - request:
152
153
  method: put
153
154
  uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
@@ -171,7 +172,7 @@ http_interactions:
171
172
  Content-Type:
172
173
  - application/json
173
174
  Date:
174
- - Wed, 20 Aug 2014 20:52:14 GMT
175
+ - Tue, 09 Sep 2014 12:15:06 GMT
175
176
  Pragma:
176
177
  - no-cache
177
178
  Server:
@@ -185,5 +186,5 @@ http_interactions:
185
186
  string: ! '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
186
187
  "role:highlander", "tag:the_one_and_only"]}'
187
188
  http_version:
188
- recorded_at: Wed, 20 Aug 2014 20:52:13 GMT
189
+ recorded_at: Tue, 09 Sep 2014 12:15:05 GMT
189
190
  recorded_with: VCR 2.9.2