chef-handler-datadog 0.12.3 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +158 -0
  3. data/.gitignore +0 -1
  4. data/CHANGELOG.md +9 -0
  5. data/Gemfile +1 -0
  6. data/Gemfile.lock +296 -0
  7. data/README.md +1 -1
  8. data/chef-handler-datadog.gemspec +1 -1
  9. data/lib/chef/handler/datadog_chef_events.rb +3 -0
  10. data/lib/chef/handler/datadog_chef_tags.rb +2 -1
  11. data/lib/chef_handler_datadog.rb +1 -1
  12. data/spec/datadog_spec.rb +173 -166
  13. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +239 -181
  14. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +119 -90
  15. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +119 -90
  16. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +119 -89
  17. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +119 -89
  18. 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 +119 -89
  19. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +119 -89
  20. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +119 -89
  21. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +119 -89
  22. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +119 -89
  23. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +119 -89
  24. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml +119 -89
  25. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/only_emits_the_run_status_metrics.yml +74 -56
  26. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml +74 -56
  27. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/only_emits_the_run_status_metrics.yml +73 -55
  28. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/posts_an_event.yml +73 -55
  29. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_enabled/sets_the_policy_name_and_policy_group_tags.yml +120 -90
  30. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_not_enabled/does_not_set_the_policy_name_and_policy_group_tags.yml +111 -81
  31. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_scope_prefix.yml +119 -90
  32. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml +117 -127
  33. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_scope_prefix.yml +119 -90
  34. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml +121 -92
  35. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml +119 -90
  36. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_specified/does_not_include_the_tag_s_specified.yml +118 -88
  37. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_unspecified/should_include_all_of_the_tag_s_.yml +118 -88
  38. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml +119 -90
  39. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml +112 -124
  40. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml +108 -210
  41. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml +110 -168
  42. data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +119 -89
  43. metadata +9 -21
  44. data/.travis.yml +0 -34
  45. data/gemfiles/chef_12.7.gemfile +0 -16
  46. data/gemfiles/chef_12.gemfile +0 -16
  47. data/gemfiles/chef_13.gemfile +0 -16
  48. data/gemfiles/chef_14.gemfile +0 -16
  49. data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +0 -143
  50. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_events/posts_an_event.yml +0 -575
  51. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_metrics/reports_metrics.yml +0 -575
  52. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/sets_tags/puts_the_tags_for_the_current_node.yml +0 -575
@@ -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.run.success","points":[[1453838668,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321255,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -20,31 +20,35 @@ http_interactions:
20
20
  code: 202
21
21
  message: Accepted
22
22
  headers:
23
+ Date:
24
+ - Mon, 06 Jan 2020 14:34:14 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Tue, 26 Jan 2016 20:04:26 GMT
27
- Dd-Pool:
28
- - propjoe
29
- Strict-Transport-Security:
30
- - max-age=15724800;
31
- X-Content-Type-Options:
32
- - nosniff
33
27
  Content-Length:
34
28
  - '16'
35
29
  Connection:
36
30
  - keep-alive
31
+ Dd-Pool:
32
+ - propjoe
33
+ Content-Security-Policy:
34
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Strict-Transport-Security:
40
+ - max-age=15724800;
37
41
  body:
38
42
  encoding: UTF-8
39
43
  string: '{"status": "ok"}'
40
- http_version:
41
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
42
46
  - request:
43
47
  method: post
44
48
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
45
49
  body:
46
50
  encoding: UTF-8
47
- string: '{"series":[{"metric":"chef.run.failure","points":[[1453838668,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321255,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
48
52
  headers:
49
53
  Accept-Encoding:
50
54
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -59,31 +63,35 @@ http_interactions:
59
63
  code: 202
60
64
  message: Accepted
61
65
  headers:
66
+ Date:
67
+ - Mon, 06 Jan 2020 14:34:14 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Tue, 26 Jan 2016 20:04:26 GMT
66
- Dd-Pool:
67
- - propjoe
68
- Strict-Transport-Security:
69
- - max-age=15724800;
70
- X-Content-Type-Options:
71
- - nosniff
72
70
  Content-Length:
73
71
  - '16'
74
72
  Connection:
75
73
  - keep-alive
74
+ Dd-Pool:
75
+ - propjoe
76
+ Content-Security-Policy:
77
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
78
+ X-Frame-Options:
79
+ - SAMEORIGIN
80
+ X-Content-Type-Options:
81
+ - nosniff
82
+ Strict-Transport-Security:
83
+ - max-age=15724800;
76
84
  body:
77
85
  encoding: UTF-8
78
86
  string: '{"status": "ok"}'
79
- http_version:
80
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
81
89
  - request:
82
90
  method: post
83
91
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
84
92
  body:
85
93
  encoding: UTF-8
86
- string: '{"series":[{"metric":"chef.resources.total","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
87
95
  headers:
88
96
  Accept-Encoding:
89
97
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -98,31 +106,35 @@ http_interactions:
98
106
  code: 202
99
107
  message: Accepted
100
108
  headers:
109
+ Date:
110
+ - Mon, 06 Jan 2020 14:34:14 GMT
101
111
  Content-Type:
102
112
  - text/json
103
- Date:
104
- - Tue, 26 Jan 2016 20:04:26 GMT
105
- Dd-Pool:
106
- - propjoe
107
- Strict-Transport-Security:
108
- - max-age=15724800;
109
- X-Content-Type-Options:
110
- - nosniff
111
113
  Content-Length:
112
114
  - '16'
113
115
  Connection:
114
116
  - keep-alive
117
+ Dd-Pool:
118
+ - propjoe
119
+ Content-Security-Policy:
120
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
121
+ X-Frame-Options:
122
+ - SAMEORIGIN
123
+ X-Content-Type-Options:
124
+ - nosniff
125
+ Strict-Transport-Security:
126
+ - max-age=15724800;
115
127
  body:
116
128
  encoding: UTF-8
117
129
  string: '{"status": "ok"}'
118
- http_version:
119
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
120
132
  - request:
121
133
  method: post
122
134
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
123
135
  body:
124
136
  encoding: UTF-8
125
- string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
126
138
  headers:
127
139
  Accept-Encoding:
128
140
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -137,31 +149,35 @@ http_interactions:
137
149
  code: 202
138
150
  message: Accepted
139
151
  headers:
152
+ Date:
153
+ - Mon, 06 Jan 2020 14:34:15 GMT
140
154
  Content-Type:
141
155
  - text/json
142
- Date:
143
- - Tue, 26 Jan 2016 20:04:26 GMT
144
- Dd-Pool:
145
- - propjoe
146
- Strict-Transport-Security:
147
- - max-age=15724800;
148
- X-Content-Type-Options:
149
- - nosniff
150
156
  Content-Length:
151
157
  - '16'
152
158
  Connection:
153
159
  - keep-alive
160
+ Dd-Pool:
161
+ - propjoe
162
+ Content-Security-Policy:
163
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
164
+ X-Frame-Options:
165
+ - SAMEORIGIN
166
+ X-Content-Type-Options:
167
+ - nosniff
168
+ Strict-Transport-Security:
169
+ - max-age=15724800;
154
170
  body:
155
171
  encoding: UTF-8
156
172
  string: '{"status": "ok"}'
157
- http_version:
158
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
159
175
  - request:
160
176
  method: post
161
177
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
162
178
  body:
163
179
  encoding: UTF-8
164
- string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838668,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321255,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
165
181
  headers:
166
182
  Accept-Encoding:
167
183
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -176,25 +192,29 @@ http_interactions:
176
192
  code: 202
177
193
  message: Accepted
178
194
  headers:
195
+ Date:
196
+ - Mon, 06 Jan 2020 14:34:15 GMT
179
197
  Content-Type:
180
198
  - text/json
181
- Date:
182
- - Tue, 26 Jan 2016 20:04:26 GMT
183
- Dd-Pool:
184
- - propjoe
185
- Strict-Transport-Security:
186
- - max-age=15724800;
187
- X-Content-Type-Options:
188
- - nosniff
189
199
  Content-Length:
190
200
  - '16'
191
201
  Connection:
192
202
  - keep-alive
203
+ Dd-Pool:
204
+ - propjoe
205
+ Content-Security-Policy:
206
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
207
+ X-Frame-Options:
208
+ - SAMEORIGIN
209
+ X-Content-Type-Options:
210
+ - nosniff
211
+ Strict-Transport-Security:
212
+ - max-age=15724800;
193
213
  body:
194
214
  encoding: UTF-8
195
215
  string: '{"status": "ok"}'
196
- http_version:
197
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
198
218
  - request:
199
219
  method: post
200
220
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
@@ -203,7 +223,7 @@ http_interactions:
203
223
  string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically
204
224
  defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n-
205
225
  [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
206
- Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838668,"msg_title":"Chef
226
+ Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321255,"msg_title":"Chef
207
227
  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
208
228
  failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n-
209
229
  [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
@@ -223,32 +243,36 @@ http_interactions:
223
243
  code: 202
224
244
  message: Accepted
225
245
  headers:
226
- Content-Type:
227
- - text/plain; charset=utf-8
228
246
  Date:
229
- - Tue, 26 Jan 2016 20:04:26 GMT
247
+ - Mon, 06 Jan 2020 14:34:15 GMT
248
+ Content-Type:
249
+ - application/json
250
+ Content-Length:
251
+ - '649'
252
+ Connection:
253
+ - keep-alive
230
254
  Dd-Pool:
231
255
  - propjoe
232
- Strict-Transport-Security:
233
- - max-age=15724800;
256
+ Content-Security-Policy:
257
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
258
+ X-Frame-Options:
259
+ - SAMEORIGIN
234
260
  X-Content-Type-Options:
235
261
  - nosniff
236
- Content-Length:
237
- - '647'
238
- Connection:
239
- - keep-alive
262
+ Strict-Transport-Security:
263
+ - max-age=15724800;
240
264
  body:
241
265
  encoding: UTF-8
242
- string: '{"status":"ok","event":{"id":381236694692316426,"title":"Chef failed
266
+ string: '{"status":"ok","event":{"id":5269025444189820152,"title":"Chef failed
243
267
  in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws]
244
268
  (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
245
269
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
246
- Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838668,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236694692316426"}}'
247
- http_version:
248
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
270
+ Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321255,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269025444189820152"}}'
271
+ http_version:
272
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
249
273
  - request:
250
274
  method: put
251
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
275
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?source=chef
252
276
  body:
253
277
  encoding: UTF-8
254
278
  string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
@@ -259,6 +283,10 @@ http_interactions:
259
283
  - "*/*"
260
284
  User-Agent:
261
285
  - Ruby
286
+ Dd-Api-Key:
287
+ - "<API_KEY>"
288
+ Dd-Application-Key:
289
+ - "<APPLICATION_KEY>"
262
290
  Content-Type:
263
291
  - application/json
264
292
  response:
@@ -266,40 +294,41 @@ http_interactions:
266
294
  code: 201
267
295
  message: Created
268
296
  headers:
269
- Cache-Control:
270
- - no-cache
297
+ Date:
298
+ - Mon, 06 Jan 2020 14:34:16 GMT
271
299
  Content-Type:
272
300
  - application/json
273
- Date:
274
- - Tue, 26 Jan 2016 20:04:26 GMT
275
- Dd-Pool:
276
- - dogweb_sameorig
301
+ Content-Length:
302
+ - '107'
303
+ Connection:
304
+ - keep-alive
277
305
  Pragma:
278
306
  - no-cache
279
- Strict-Transport-Security:
280
- - max-age=15724800;
281
- X-Content-Type-Options:
282
- - nosniff
307
+ Cache-Control:
308
+ - no-cache
283
309
  X-Dd-Debug:
284
- - 4G6DflkbLuEPHPN7r5QLLJW1+B1YXxXufb+VXQ5hU44=
310
+ - yqCkAb2Y8/4OgTSGYvedTl/k5gsPukDI7OLTlGSm9adIbRDVlGb00Ve5DDv9ImFD
311
+ Dd-Pool:
312
+ - dogweb
313
+ Content-Security-Policy:
314
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
285
315
  X-Frame-Options:
286
316
  - SAMEORIGIN
287
- Content-Length:
288
- - '112'
289
- Connection:
290
- - keep-alive
317
+ X-Content-Type-Options:
318
+ - nosniff
319
+ Strict-Transport-Security:
320
+ - max-age=15724800;
291
321
  body:
292
322
  encoding: UTF-8
293
- string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
294
- "role:highlander", "tag:the_one_and_only"]}'
295
- http_version:
296
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
323
+ string: '{"host":"chef.handler.datadog.test-failed","tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
324
+ http_version:
325
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
297
326
  - request:
298
327
  method: post
299
328
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
300
329
  body:
301
330
  encoding: UTF-8
302
- string: '{"series":[{"metric":"chef.run.success","points":[[1453838668,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
331
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321255,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
303
332
  headers:
304
333
  Accept-Encoding:
305
334
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -314,31 +343,35 @@ http_interactions:
314
343
  code: 202
315
344
  message: Accepted
316
345
  headers:
346
+ Date:
347
+ - Mon, 06 Jan 2020 14:34:16 GMT
317
348
  Content-Type:
318
349
  - text/json
319
- Date:
320
- - Tue, 26 Jan 2016 20:04:26 GMT
321
- Dd-Pool:
322
- - propjoe
323
- Strict-Transport-Security:
324
- - max-age=15724800;
325
- X-Content-Type-Options:
326
- - nosniff
327
350
  Content-Length:
328
351
  - '16'
329
352
  Connection:
330
353
  - keep-alive
354
+ Dd-Pool:
355
+ - propjoe
356
+ Content-Security-Policy:
357
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
358
+ X-Frame-Options:
359
+ - SAMEORIGIN
360
+ X-Content-Type-Options:
361
+ - nosniff
362
+ Strict-Transport-Security:
363
+ - max-age=15724800;
331
364
  body:
332
365
  encoding: UTF-8
333
366
  string: '{"status": "ok"}'
334
- http_version:
335
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
367
+ http_version:
368
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
336
369
  - request:
337
370
  method: post
338
371
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
339
372
  body:
340
373
  encoding: UTF-8
341
- string: '{"series":[{"metric":"chef.run.failure","points":[[1453838668,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
374
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321255,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
342
375
  headers:
343
376
  Accept-Encoding:
344
377
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -353,31 +386,35 @@ http_interactions:
353
386
  code: 202
354
387
  message: Accepted
355
388
  headers:
389
+ Date:
390
+ - Mon, 06 Jan 2020 14:34:17 GMT
356
391
  Content-Type:
357
392
  - text/json
358
- Date:
359
- - Tue, 26 Jan 2016 20:04:26 GMT
360
- Dd-Pool:
361
- - propjoe
362
- Strict-Transport-Security:
363
- - max-age=15724800;
364
- X-Content-Type-Options:
365
- - nosniff
366
393
  Content-Length:
367
394
  - '16'
368
395
  Connection:
369
396
  - keep-alive
397
+ Dd-Pool:
398
+ - propjoe
399
+ Content-Security-Policy:
400
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
401
+ X-Frame-Options:
402
+ - SAMEORIGIN
403
+ X-Content-Type-Options:
404
+ - nosniff
405
+ Strict-Transport-Security:
406
+ - max-age=15724800;
370
407
  body:
371
408
  encoding: UTF-8
372
409
  string: '{"status": "ok"}'
373
- http_version:
374
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
410
+ http_version:
411
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
375
412
  - request:
376
413
  method: post
377
414
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
378
415
  body:
379
416
  encoding: UTF-8
380
- string: '{"series":[{"metric":"chef.resources.total","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
417
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
381
418
  headers:
382
419
  Accept-Encoding:
383
420
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -392,31 +429,35 @@ http_interactions:
392
429
  code: 202
393
430
  message: Accepted
394
431
  headers:
432
+ Date:
433
+ - Mon, 06 Jan 2020 14:34:17 GMT
395
434
  Content-Type:
396
435
  - text/json
397
- Date:
398
- - Tue, 26 Jan 2016 20:04:26 GMT
399
- Dd-Pool:
400
- - propjoe
401
- Strict-Transport-Security:
402
- - max-age=15724800;
403
- X-Content-Type-Options:
404
- - nosniff
405
436
  Content-Length:
406
437
  - '16'
407
438
  Connection:
408
439
  - keep-alive
440
+ Dd-Pool:
441
+ - propjoe
442
+ Content-Security-Policy:
443
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
444
+ X-Frame-Options:
445
+ - SAMEORIGIN
446
+ X-Content-Type-Options:
447
+ - nosniff
448
+ Strict-Transport-Security:
449
+ - max-age=15724800;
409
450
  body:
410
451
  encoding: UTF-8
411
452
  string: '{"status": "ok"}'
412
- http_version:
413
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
453
+ http_version:
454
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
414
455
  - request:
415
456
  method: post
416
457
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
417
458
  body:
418
459
  encoding: UTF-8
419
- string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
460
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
420
461
  headers:
421
462
  Accept-Encoding:
422
463
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -431,31 +472,35 @@ http_interactions:
431
472
  code: 202
432
473
  message: Accepted
433
474
  headers:
475
+ Date:
476
+ - Mon, 06 Jan 2020 14:34:17 GMT
434
477
  Content-Type:
435
478
  - text/json
436
- Date:
437
- - Tue, 26 Jan 2016 20:04:27 GMT
438
- Dd-Pool:
439
- - propjoe
440
- Strict-Transport-Security:
441
- - max-age=15724800;
442
- X-Content-Type-Options:
443
- - nosniff
444
479
  Content-Length:
445
480
  - '16'
446
481
  Connection:
447
482
  - keep-alive
483
+ Dd-Pool:
484
+ - propjoe
485
+ Content-Security-Policy:
486
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
487
+ X-Frame-Options:
488
+ - SAMEORIGIN
489
+ X-Content-Type-Options:
490
+ - nosniff
491
+ Strict-Transport-Security:
492
+ - max-age=15724800;
448
493
  body:
449
494
  encoding: UTF-8
450
495
  string: '{"status": "ok"}'
451
- http_version:
452
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
496
+ http_version:
497
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
453
498
  - request:
454
499
  method: post
455
500
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
456
501
  body:
457
502
  encoding: UTF-8
458
- string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838668,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
503
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321255,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
459
504
  headers:
460
505
  Accept-Encoding:
461
506
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -470,25 +515,29 @@ http_interactions:
470
515
  code: 202
471
516
  message: Accepted
472
517
  headers:
518
+ Date:
519
+ - Mon, 06 Jan 2020 14:34:18 GMT
473
520
  Content-Type:
474
521
  - text/json
475
- Date:
476
- - Tue, 26 Jan 2016 20:04:27 GMT
477
- Dd-Pool:
478
- - propjoe
479
- Strict-Transport-Security:
480
- - max-age=15724800;
481
- X-Content-Type-Options:
482
- - nosniff
483
522
  Content-Length:
484
523
  - '16'
485
524
  Connection:
486
525
  - keep-alive
526
+ Dd-Pool:
527
+ - propjoe
528
+ Content-Security-Policy:
529
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
530
+ X-Frame-Options:
531
+ - SAMEORIGIN
532
+ X-Content-Type-Options:
533
+ - nosniff
534
+ Strict-Transport-Security:
535
+ - max-age=15724800;
487
536
  body:
488
537
  encoding: UTF-8
489
538
  string: '{"status": "ok"}'
490
- http_version:
491
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
539
+ http_version:
540
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
492
541
  - request:
493
542
  method: post
494
543
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
@@ -497,8 +546,8 @@ http_interactions:
497
546
  string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically
498
547
  defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n-
499
548
  [fur] (dynamically defined)\n\n$$$\n\nAlerting: @alice @bob\n\n$$$\nChef::Exceptions::UnsupportedAction:
500
- Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838668,"msg_title":"Chef
501
- 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
549
+ Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321255,"msg_title":"Chef
550
+ 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
502
551
  failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n-
503
552
  [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
504
553
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\nAlerting:
@@ -517,35 +566,39 @@ http_interactions:
517
566
  code: 202
518
567
  message: Accepted
519
568
  headers:
520
- Content-Type:
521
- - text/plain; charset=utf-8
522
569
  Date:
523
- - Tue, 26 Jan 2016 20:04:27 GMT
570
+ - Mon, 06 Jan 2020 14:34:18 GMT
571
+ Content-Type:
572
+ - application/json
573
+ Content-Length:
574
+ - '674'
575
+ Connection:
576
+ - keep-alive
524
577
  Dd-Pool:
525
578
  - propjoe
526
- Strict-Transport-Security:
527
- - max-age=15724800;
579
+ Content-Security-Policy:
580
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
581
+ X-Frame-Options:
582
+ - SAMEORIGIN
528
583
  X-Content-Type-Options:
529
584
  - nosniff
530
- Content-Length:
531
- - '676'
532
- Connection:
533
- - keep-alive
585
+ Strict-Transport-Security:
586
+ - max-age=15724800;
534
587
  body:
535
588
  encoding: UTF-8
536
- string: '{"status":"ok","event":{"id":381236701686654829,"title":"Chef failed
589
+ string: '{"status":"ok","event":{"id":5269025486229085429,"title":"Chef failed
537
590
  in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws]
538
591
  (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
539
592
  defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\nAlerting:
540
- @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":1453838668,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236701686654829"}}'
541
- http_version:
542
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
593
+ @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":1578321255,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269025486229085429"}}'
594
+ http_version:
595
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
543
596
  - request:
544
597
  method: put
545
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
598
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?source=chef
546
599
  body:
547
600
  encoding: UTF-8
548
- string: '{"tags":["env:hostile","role:highlander","tag:tag:the_one_and_only"]}'
601
+ string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
549
602
  headers:
550
603
  Accept-Encoding:
551
604
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -553,6 +606,10 @@ http_interactions:
553
606
  - "*/*"
554
607
  User-Agent:
555
608
  - Ruby
609
+ Dd-Api-Key:
610
+ - "<API_KEY>"
611
+ Dd-Application-Key:
612
+ - "<APPLICATION_KEY>"
556
613
  Content-Type:
557
614
  - application/json
558
615
  response:
@@ -560,32 +617,33 @@ http_interactions:
560
617
  code: 201
561
618
  message: Created
562
619
  headers:
563
- Cache-Control:
564
- - no-cache
620
+ Date:
621
+ - Mon, 06 Jan 2020 14:34:18 GMT
565
622
  Content-Type:
566
623
  - application/json
567
- Date:
568
- - Tue, 26 Jan 2016 20:04:27 GMT
569
- Dd-Pool:
570
- - dogweb_sameorig
624
+ Content-Length:
625
+ - '107'
626
+ Connection:
627
+ - keep-alive
571
628
  Pragma:
572
629
  - no-cache
573
- Strict-Transport-Security:
574
- - max-age=15724800;
575
- X-Content-Type-Options:
576
- - nosniff
630
+ Cache-Control:
631
+ - no-cache
577
632
  X-Dd-Debug:
578
- - QKcGho/VVHvOvAFq4WeaqBhqhL8eYL3K9CW+TToIP+o=
633
+ - qA85Kiicwd/s93AfT3MSf+l6IYc5FQ6tEbp4Kft/ri41UOumJ967MPQKmz3gwejd
634
+ Dd-Pool:
635
+ - dogweb
636
+ Content-Security-Policy:
637
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
579
638
  X-Frame-Options:
580
639
  - SAMEORIGIN
581
- Content-Length:
582
- - '116'
583
- Connection:
584
- - keep-alive
640
+ X-Content-Type-Options:
641
+ - nosniff
642
+ Strict-Transport-Security:
643
+ - max-age=15724800;
585
644
  body:
586
645
  encoding: UTF-8
587
- string: '{"host": "chef.handler.datadog.test-failed", "tags": ["tag:tag:the_one_and_only",
588
- "env:hostile", "role:highlander"]}'
589
- http_version:
590
- recorded_at: Tue, 26 Jan 2016 20:04:28 GMT
591
- recorded_with: VCR 3.0.1
646
+ string: '{"host":"chef.handler.datadog.test-failed","tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
647
+ http_version:
648
+ recorded_at: Mon, 06 Jan 2020 14:34:15 GMT
649
+ recorded_with: VCR 5.0.0