chef-handler-datadog 0.12.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +158 -0
  3. data/.gitignore +0 -1
  4. data/.rubocop.yml +5 -0
  5. data/CHANGELOG.md +33 -0
  6. data/CONTRIBUTING.md +14 -0
  7. data/Gemfile +1 -0
  8. data/Gemfile.lock +296 -0
  9. data/README.md +1 -3
  10. data/chef-handler-datadog.gemspec +10 -10
  11. data/lib/chef/handler/datadog.rb +18 -13
  12. data/lib/chef/handler/datadog_chef_events.rb +3 -0
  13. data/lib/chef/handler/datadog_chef_tags.rb +2 -1
  14. data/lib/chef_handler_datadog.rb +1 -1
  15. data/spec/datadog_spec.rb +216 -166
  16. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +239 -181
  17. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +119 -90
  18. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +119 -90
  19. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +119 -89
  20. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +119 -89
  21. 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
  22. 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
  23. 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
  24. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +119 -89
  25. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +119 -89
  26. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +119 -89
  27. 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
  28. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/only_emits_the_run_status_metrics.yml +74 -56
  29. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml +74 -56
  30. 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
  31. 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
  32. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_enabled/sets_the_policy_name_and_policy_group_tags.yml +120 -90
  33. 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
  34. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_scope_prefix.yml +119 -90
  35. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml +117 -127
  36. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_scope_prefix.yml +119 -90
  37. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml +121 -92
  38. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml +119 -90
  39. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_specified/does_not_include_the_tag_s_specified.yml +118 -88
  40. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_unspecified/should_include_all_of_the_tag_s_.yml +118 -88
  41. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml +119 -90
  42. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml +112 -124
  43. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml +108 -210
  44. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml +110 -168
  45. data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +119 -89
  46. metadata +13 -24
  47. data/.travis.yml +0 -34
  48. data/gemfiles/chef_12.7.gemfile +0 -16
  49. data/gemfiles/chef_12.gemfile +0 -16
  50. data/gemfiles/chef_13.gemfile +0 -16
  51. data/gemfiles/chef_14.gemfile +0 -16
  52. data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +0 -143
  53. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_events/posts_an_event.yml +0 -575
  54. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_metrics/reports_metrics.yml +0 -575
  55. 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":[[1453838669,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321260,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:19 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Tue, 26 Jan 2016 20:04:27 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:29 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:34:20 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":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321260,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:19 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Tue, 26 Jan 2016 20:04:27 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:29 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:34:20 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":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321260,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:19 GMT
101
111
  Content-Type:
102
112
  - text/json
103
- Date:
104
- - Tue, 26 Jan 2016 20:04:28 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:29 GMT
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:34:20 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":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321260,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:20 GMT
140
154
  Content-Type:
141
155
  - text/json
142
- Date:
143
- - Tue, 26 Jan 2016 20:04:28 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:29 GMT
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:34:20 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":[[1453838669,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321260,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:20 GMT
179
197
  Content-Type:
180
198
  - text/json
181
- Date:
182
- - Tue, 26 Jan 2016 20:04:28 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:29 GMT
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:34:20 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":1453838669,"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":1578321260,"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:28 GMT
247
+ - Mon, 06 Jan 2020 14:34:20 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":381236719251068806,"title":"Chef failed
266
+ string: '{"status":"ok","event":{"id":5269025529092355308,"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":1453838669,"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=381236719251068806"}}'
247
- http_version:
248
- recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
270
+ Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321260,"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=5269025529092355308"}}'
271
+ http_version:
272
+ recorded_at: Mon, 06 Jan 2020 14:34:20 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,32 +294,33 @@ 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:21 GMT
271
299
  Content-Type:
272
300
  - application/json
273
- Date:
274
- - Tue, 26 Jan 2016 20:04:28 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
- - 9Q+iFAw9d2jVl1KLdG/nY8rs36fWfVouK6InLAr8+BM=
310
+ - ADT0ms9dQnbDHbbduv4c09ChngZrYY7A/Pgms/qacMOruS4mPwZ1GJWq74I7G11W
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:29 GMT
297
- recorded_with: VCR 3.0.1
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:20 GMT
326
+ recorded_with: VCR 5.0.0
@@ -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":[[1453838669,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321263,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:21 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Tue, 26 Jan 2016 20:04:27 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:29 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:34:23 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":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321263,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:22 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Tue, 26 Jan 2016 20:04:27 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:29 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:34:23 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":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321263,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:22 GMT
101
111
  Content-Type:
102
112
  - text/json
103
- Date:
104
- - Tue, 26 Jan 2016 20:04:27 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:29 GMT
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:34:23 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":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321263,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:22 GMT
140
154
  Content-Type:
141
155
  - text/json
142
- Date:
143
- - Tue, 26 Jan 2016 20:04:27 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:29 GMT
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:34:23 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":[[1453838669,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321263,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:23 GMT
179
197
  Content-Type:
180
198
  - text/json
181
- Date:
182
- - Tue, 26 Jan 2016 20:04:27 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:29 GMT
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:34:23 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":1453838669,"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":1578321263,"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:27 GMT
247
+ - Mon, 06 Jan 2020 14:34:23 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":381236709941151618,"title":"Chef failed
266
+ string: '{"status":"ok","event":{"id":5269025572080572521,"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":1453838669,"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=381236709941151618"}}'
247
- http_version:
248
- recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
270
+ Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321263,"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=5269025572080572521"}}'
271
+ http_version:
272
+ recorded_at: Mon, 06 Jan 2020 14:34:23 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,32 +294,33 @@ 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:23 GMT
271
299
  Content-Type:
272
300
  - application/json
273
- Date:
274
- - Tue, 26 Jan 2016 20:04:27 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
- - 9Q+iFAw9d2jVl1KLdG/nY8rs36fWfVouK6InLAr8+BM=
310
+ - kqXz3OvR7iajEJOdRFWpzJtcDHRumYwGfjdF12Vd65Xt1uV9T6lEO/K0lkxmcRvl
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:29 GMT
297
- recorded_with: VCR 3.0.1
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:23 GMT
326
+ recorded_with: VCR 5.0.0