chef-handler-datadog 0.12.3 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321197,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -20,29 +20,35 @@ http_interactions:
20
20
  code: 202
21
21
  message: Accepted
22
22
  headers:
23
- Content-Type:
24
- - text/json; charset=UTF-8
25
23
  Date:
26
- - Sun, 05 Apr 2015 15:49:21 GMT
27
- Server:
28
- - dogdispatcher/6.1.23
29
- Strict-Transport-Security:
30
- - max-age=15724800;
24
+ - Mon, 06 Jan 2020 14:33:12 GMT
25
+ Content-Type:
26
+ - text/json
31
27
  Content-Length:
32
- - '15'
28
+ - '16'
33
29
  Connection:
34
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;
35
41
  body:
36
42
  encoding: UTF-8
37
- string: '{"status":"ok"}'
38
- http_version:
39
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
43
+ string: '{"status": "ok"}'
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:33:17 GMT
40
46
  - request:
41
47
  method: post
42
48
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
43
49
  body:
44
50
  encoding: UTF-8
45
- string: '{"series":[{"metric":"chef.run.failure","points":[[1453838676,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321197,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
46
52
  headers:
47
53
  Accept-Encoding:
48
54
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -57,29 +63,35 @@ http_interactions:
57
63
  code: 202
58
64
  message: Accepted
59
65
  headers:
60
- Content-Type:
61
- - text/json; charset=UTF-8
62
66
  Date:
63
- - Sun, 05 Apr 2015 15:49:21 GMT
64
- Server:
65
- - dogdispatcher/6.1.23
66
- Strict-Transport-Security:
67
- - max-age=15724800;
67
+ - Mon, 06 Jan 2020 14:33:13 GMT
68
+ Content-Type:
69
+ - text/json
68
70
  Content-Length:
69
- - '15'
71
+ - '16'
70
72
  Connection:
71
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;
72
84
  body:
73
85
  encoding: UTF-8
74
- string: '{"status":"ok"}'
75
- http_version:
76
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
86
+ string: '{"status": "ok"}'
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:33:17 GMT
77
89
  - request:
78
90
  method: post
79
91
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
80
92
  body:
81
93
  encoding: UTF-8
82
- string: '{"series":[{"metric":"chef.resources.total","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321197,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
83
95
  headers:
84
96
  Accept-Encoding:
85
97
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -94,29 +106,35 @@ http_interactions:
94
106
  code: 202
95
107
  message: Accepted
96
108
  headers:
97
- Content-Type:
98
- - text/json; charset=UTF-8
99
109
  Date:
100
- - Sun, 05 Apr 2015 15:49:21 GMT
101
- Server:
102
- - dogdispatcher/6.1.23
103
- Strict-Transport-Security:
104
- - max-age=15724800;
110
+ - Mon, 06 Jan 2020 14:33:13 GMT
111
+ Content-Type:
112
+ - text/json
105
113
  Content-Length:
106
- - '15'
114
+ - '16'
107
115
  Connection:
108
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;
109
127
  body:
110
128
  encoding: UTF-8
111
- string: '{"status":"ok"}'
112
- http_version:
113
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
129
+ string: '{"status": "ok"}'
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:33:17 GMT
114
132
  - request:
115
133
  method: post
116
134
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
117
135
  body:
118
136
  encoding: UTF-8
119
- string: '{"series":[{"metric":"chef.resources.updated","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321197,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
120
138
  headers:
121
139
  Accept-Encoding:
122
140
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -131,29 +149,35 @@ http_interactions:
131
149
  code: 202
132
150
  message: Accepted
133
151
  headers:
134
- Content-Type:
135
- - text/json; charset=UTF-8
136
152
  Date:
137
- - Sun, 05 Apr 2015 15:49:22 GMT
138
- Server:
139
- - dogdispatcher/6.1.23
140
- Strict-Transport-Security:
141
- - max-age=15724800;
153
+ - Mon, 06 Jan 2020 14:33:13 GMT
154
+ Content-Type:
155
+ - text/json
142
156
  Content-Length:
143
- - '15'
157
+ - '16'
144
158
  Connection:
145
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;
146
170
  body:
147
171
  encoding: UTF-8
148
- string: '{"status":"ok"}'
149
- http_version:
150
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
172
+ string: '{"status": "ok"}'
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:33:17 GMT
151
175
  - request:
152
176
  method: post
153
177
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
154
178
  body:
155
179
  encoding: UTF-8
156
- string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1428248966,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321197,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
157
181
  headers:
158
182
  Accept-Encoding:
159
183
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -168,32 +192,38 @@ http_interactions:
168
192
  code: 202
169
193
  message: Accepted
170
194
  headers:
171
- Content-Type:
172
- - text/json; charset=UTF-8
173
195
  Date:
174
- - Sun, 05 Apr 2015 15:49:23 GMT
175
- Server:
176
- - dogdispatcher/6.1.23
177
- Strict-Transport-Security:
178
- - max-age=15724800;
196
+ - Mon, 06 Jan 2020 14:33:14 GMT
197
+ Content-Type:
198
+ - text/json
179
199
  Content-Length:
180
- - '15'
200
+ - '16'
181
201
  Connection:
182
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;
183
213
  body:
184
214
  encoding: UTF-8
185
- string: '{"status":"ok"}'
186
- http_version:
187
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
215
+ string: '{"status": "ok"}'
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:33:17 GMT
188
218
  - request:
189
219
  method: post
190
220
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
191
221
  body:
192
222
  encoding: UTF-8
193
- string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1428248966,"msg_title":"Chef
194
- completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
195
- completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated
196
- 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}'
223
+ string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321197,"msg_title":"Chef
224
+ completed in 5 seconds on chef.handler.datadog.test-tags-retries ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
225
+ completed in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef
226
+ updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags-retries","device":null}'
197
227
  headers:
198
228
  Accept-Encoding:
199
229
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -208,117 +238,29 @@ http_interactions:
208
238
  code: 202
209
239
  message: Accepted
210
240
  headers:
211
- Content-Type:
212
- - text/json; charset=UTF-8
213
241
  Date:
214
- - Sun, 05 Apr 2015 15:49:23 GMT
215
- Server:
216
- - dogdispatcher/6.1.23
217
- Strict-Transport-Security:
218
- - max-age=15724800;
219
- Content-Length:
220
- - '420'
221
- Connection:
222
- - keep-alive
223
- body:
224
- encoding: UTF-8
225
- string: '{"status": "ok", "event": {"priority": "low", "date_happened": 1428248966,
226
- "handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-tags
227
- ", "url": "https://app.datadoghq.com/event/event?id=2751230185062799345",
228
- "text": "Chef updated 0 resources out of 0 resources total.", "tags": ["env:hostile",
229
- "role:highlander", "tag:the_one_and_only"], "related_event_id": null, "id":
230
- 2751230185062799345}}'
231
- http_version:
232
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
233
- - request:
234
- method: put
235
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
236
- body:
237
- encoding: UTF-8
238
- string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
239
- headers:
240
- Accept-Encoding:
241
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
242
- Accept:
243
- - "*/*"
244
- User-Agent:
245
- - Ruby
246
- Content-Type:
247
- - application/json
248
- response:
249
- status:
250
- code: 404
251
- message: Not Found
252
- headers:
253
- Cache-Control:
254
- - no-cache
242
+ - Mon, 06 Jan 2020 14:33:14 GMT
255
243
  Content-Type:
256
244
  - application/json
257
- Date:
258
- - Sun, 05 Apr 2015 15:49:24 GMT
259
- Pragma:
260
- - no-cache
261
- Server:
262
- - gunicorn/19.1.0
263
- Strict-Transport-Security:
264
- - max-age=15724800;
265
- X-Dd-Debug:
266
- - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8=
267
- X-Frame-Options:
268
- - SAMEORIGIN
269
245
  Content-Length:
270
- - '44'
246
+ - '406'
271
247
  Connection:
272
248
  - keep-alive
273
- body:
274
- encoding: UTF-8
275
- string: '{"errors": ["No host matches that host_id"]}'
276
- http_version:
277
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
278
- - request:
279
- method: put
280
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
281
- body:
282
- encoding: UTF-8
283
- string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
284
- headers:
285
- Accept-Encoding:
286
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
287
- Accept:
288
- - "*/*"
289
- User-Agent:
290
- - Ruby
291
- Content-Type:
292
- - application/json
293
- response:
294
- status:
295
- code: 201
296
- message: Created
297
- headers:
298
- Cache-Control:
299
- - no-cache
300
- Content-Type:
301
- - application/json
302
- Date:
303
- - Sun, 05 Apr 2015 15:49:24 GMT
304
- Pragma:
305
- - no-cache
306
- Server:
307
- - gunicorn/19.1.0
308
- Strict-Transport-Security:
309
- - max-age=15724800;
310
- X-Dd-Debug:
311
- - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8=
249
+ Dd-Pool:
250
+ - propjoe
251
+ Content-Security-Policy:
252
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
312
253
  X-Frame-Options:
313
254
  - SAMEORIGIN
314
- Content-Length:
315
- - '110'
316
- Connection:
317
- - keep-alive
255
+ X-Content-Type-Options:
256
+ - nosniff
257
+ Strict-Transport-Security:
258
+ - max-age=15724800;
318
259
  body:
319
260
  encoding: UTF-8
320
- string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile",
321
- "role:highlander", "tag:the_one_and_only"]}'
322
- http_version:
323
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
324
- recorded_with: VCR 2.9.3
261
+ string: '{"status":"ok","event":{"id":5269024414405768619,"title":"Chef completed
262
+ in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef updated
263
+ 0 resources out of 0 resources total.","date_happened":1578321197,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269024414405768619"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:33:17 GMT
266
+ 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":[[1453838678,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321218,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","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:33:30 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Tue, 26 Jan 2016 20:04:30 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:38 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:33:38 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":[[1453838678,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321218,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","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:33:30 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Tue, 26 Jan 2016 20:04:30 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:38 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:33:38 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":[[1453838678,2.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321218,2.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","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:33:31 GMT
101
111
  Content-Type:
102
112
  - text/json
103
- Date:
104
- - Tue, 26 Jan 2016 20:04:30 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:38 GMT
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:33:38 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":[[1453838678,1.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321218,1.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","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:33:31 GMT
140
154
  Content-Type:
141
155
  - text/json
142
- Date:
143
- - Tue, 26 Jan 2016 20:04:30 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:38 GMT
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:33:38 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":[[1453838678,8.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321218,8.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}'
165
181
  headers:
166
182
  Accept-Encoding:
167
183
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -176,31 +192,35 @@ http_interactions:
176
192
  code: 202
177
193
  message: Accepted
178
194
  headers:
195
+ Date:
196
+ - Mon, 06 Jan 2020 14:33:31 GMT
179
197
  Content-Type:
180
198
  - text/json
181
- Date:
182
- - Tue, 26 Jan 2016 20:04:30 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:38 GMT
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:33:38 GMT
198
218
  - request:
199
219
  method: post
200
220
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
201
221
  body:
202
222
  encoding: UTF-8
203
- string: '{"msg_text":"\n$$$\n- [whiskers] (dynamically defined)\n\n$$$\n","date_happened":1453838678,"msg_title":"Chef
223
+ string: '{"msg_text":"\n$$$\n- [whiskers] (dynamically defined)\n\n$$$\n","date_happened":1578321218,"msg_title":"Chef
204
224
  completed in 8 seconds on chef.handler.datadog.test-resources ","priority":"low","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
205
225
  completed in 8 seconds on chef.handler.datadog.test-resources ","text":"\n$$$\n-
206
226
  [whiskers] (dynamically defined)\n\n$$$\n","host":"chef.handler.datadog.test-resources","device":null}'
@@ -218,30 +238,34 @@ http_interactions:
218
238
  code: 202
219
239
  message: Accepted
220
240
  headers:
221
- Content-Type:
222
- - text/plain; charset=utf-8
223
241
  Date:
224
- - Tue, 26 Jan 2016 20:04:30 GMT
242
+ - Mon, 06 Jan 2020 14:33:32 GMT
243
+ Content-Type:
244
+ - application/json
245
+ Content-Length:
246
+ - '364'
247
+ Connection:
248
+ - keep-alive
225
249
  Dd-Pool:
226
250
  - propjoe
227
- Strict-Transport-Security:
228
- - max-age=15724800;
251
+ Content-Security-Policy:
252
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
253
+ X-Frame-Options:
254
+ - SAMEORIGIN
229
255
  X-Content-Type-Options:
230
256
  - nosniff
231
- Content-Length:
232
- - '362'
233
- Connection:
234
- - keep-alive
257
+ Strict-Transport-Security:
258
+ - max-age=15724800;
235
259
  body:
236
260
  encoding: UTF-8
237
- string: '{"status":"ok","event":{"id":381236762571463232,"title":"Chef completed
261
+ string: '{"status":"ok","event":{"id":5269024709047942069,"title":"Chef completed
238
262
  in 8 seconds on chef.handler.datadog.test-resources ","text":"\n$$$\n- [whiskers]
239
- (dynamically defined)\n\n$$$\n","date_happened":1453838678,"handle":null,"priority":"low","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=381236762571463232"}}'
240
- http_version:
241
- recorded_at: Tue, 26 Jan 2016 20:04:38 GMT
263
+ (dynamically defined)\n\n$$$\n","date_happened":1578321218,"handle":null,"priority":"low","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024709047942069"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:33:38 GMT
242
266
  - request:
243
267
  method: put
244
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
268
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef
245
269
  body:
246
270
  encoding: UTF-8
247
271
  string: '{"tags":["env:resources"]}'
@@ -252,6 +276,10 @@ http_interactions:
252
276
  - "*/*"
253
277
  User-Agent:
254
278
  - Ruby
279
+ Dd-Api-Key:
280
+ - "<API_KEY>"
281
+ Dd-Application-Key:
282
+ - "<APPLICATION_KEY>"
255
283
  Content-Type:
256
284
  - application/json
257
285
  response:
@@ -259,31 +287,33 @@ http_interactions:
259
287
  code: 201
260
288
  message: Created
261
289
  headers:
262
- Cache-Control:
263
- - no-cache
290
+ Date:
291
+ - Mon, 06 Jan 2020 14:33:32 GMT
264
292
  Content-Type:
265
293
  - application/json
266
- Date:
267
- - Tue, 26 Jan 2016 20:04:30 GMT
268
- Dd-Pool:
269
- - dogweb_sameorig
294
+ Content-Length:
295
+ - '71'
296
+ Connection:
297
+ - keep-alive
270
298
  Pragma:
271
299
  - no-cache
272
- Strict-Transport-Security:
273
- - max-age=15724800;
274
- X-Content-Type-Options:
275
- - nosniff
300
+ Cache-Control:
301
+ - no-cache
276
302
  X-Dd-Debug:
277
- - QKcGho/VVHvOvAFq4WeaqBhqhL8eYL3K9CW+TToIP+o=
303
+ - ty7T8eIeXOfZhM7KDN5nGo8JS7ZSIWAqBNFeZshTg3LLDJJa7mPU5wqGt0nOPCpy
304
+ Dd-Pool:
305
+ - dogweb
306
+ Content-Security-Policy:
307
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
278
308
  X-Frame-Options:
279
309
  - SAMEORIGIN
280
- Content-Length:
281
- - '74'
282
- Connection:
283
- - keep-alive
310
+ X-Content-Type-Options:
311
+ - nosniff
312
+ Strict-Transport-Security:
313
+ - max-age=15724800;
284
314
  body:
285
315
  encoding: UTF-8
286
- string: '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}'
287
- http_version:
288
- recorded_at: Tue, 26 Jan 2016 20:04:38 GMT
289
- recorded_with: VCR 3.0.1
316
+ string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}'
317
+ http_version:
318
+ recorded_at: Mon, 06 Jan 2020 14:33:38 GMT
319
+ recorded_with: VCR 5.0.0