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,1.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321201,1.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","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:17 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Tue, 26 Jan 2016 20:04:24 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:33:21 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,0.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321201,0.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","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:17 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Tue, 26 Jan 2016 20:04:24 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:33:21 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,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321201,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","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:17 GMT
101
111
  Content-Type:
102
112
  - text/json
103
- Date:
104
- - Tue, 26 Jan 2016 20:04:24 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:33:21 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,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321201,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","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:18 GMT
140
154
  Content-Type:
141
155
  - text/json
142
- Date:
143
- - Tue, 26 Jan 2016 20:04:25 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:33:21 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,5.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321201,5.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","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:18 GMT
179
197
  Content-Type:
180
198
  - text/json
181
- Date:
182
- - Tue, 26 Jan 2016 20:04:25 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:33:21 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":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838669,"msg_title":"Chef
223
+ string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321201,"msg_title":"Chef
204
224
  completed in 5 seconds on chef.handler.datadog.test-ec2 ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test-ec2","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
205
225
  completed in 5 seconds on chef.handler.datadog.test-ec2 ","text":"Chef updated
206
226
  0 resources out of 0 resources total.","host":"chef.handler.datadog.test-ec2","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:25 GMT
242
+ - Mon, 06 Jan 2020 14:33:18 GMT
243
+ Content-Type:
244
+ - application/json
245
+ Content-Length:
246
+ - '356'
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
- - '354'
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":381236668415818934,"title":"Chef completed
261
+ string: '{"status":"ok","event":{"id":5269024486655155046,"title":"Chef completed
238
262
  in 5 seconds on chef.handler.datadog.test-ec2 ","text":"Chef updated 0 resources
239
- out of 0 resources total.","date_happened":1453838669,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236668415818934"}}'
240
- http_version:
241
- recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
263
+ out of 0 resources total.","date_happened":1578321201,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024486655155046"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:33:21 GMT
242
266
  - request:
243
267
  method: put
244
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-ec2?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
268
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-ec2?source=chef
245
269
  body:
246
270
  encoding: UTF-8
247
271
  string: '{"tags":["env:testing"]}'
@@ -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:19 GMT
264
292
  Content-Type:
265
293
  - application/json
266
- Date:
267
- - Tue, 26 Jan 2016 20:04:25 GMT
268
- Dd-Pool:
269
- - dogweb_sameorig
294
+ Content-Length:
295
+ - '63'
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
- - o+T6KJmtlm7/lHIbU4qEQWVkGtrRMvLvLMnhkr5jg08=
303
+ - pxuY3ZnSwE+rCP/MLubWk3EuAMlxxciIsQ2EBSRxZafCu9H4+UEVULDCm144bb3W
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
- - '66'
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-ec2", "tags": ["env:testing"]}'
287
- http_version:
288
- recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
289
- recorded_with: VCR 3.0.1
316
+ string: '{"host":"chef.handler.datadog.test-ec2","tags":["env:testing"]}'
317
+ http_version:
318
+ recorded_at: Mon, 06 Jan 2020 14:33:21 GMT
319
+ 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":[[1453838670,1.0]],"type":"counter","host":"i-123456","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321206,1.0]],"type":"counter","host":"i-123456","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:22 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Tue, 26 Jan 2016 20:04:25 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:30 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:33:26 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":[[1453838670,0.0]],"type":"counter","host":"i-123456","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321206,0.0]],"type":"counter","host":"i-123456","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:22 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Tue, 26 Jan 2016 20:04:25 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:30 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:33:26 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":[[1453838670,0.0]],"type":"gauge","host":"i-123456","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321206,0.0]],"type":"gauge","host":"i-123456","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:22 GMT
101
111
  Content-Type:
102
112
  - text/json
103
- Date:
104
- - Tue, 26 Jan 2016 20:04:25 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:30 GMT
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:33:26 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":[[1453838670,0.0]],"type":"gauge","host":"i-123456","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321206,0.0]],"type":"gauge","host":"i-123456","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:23 GMT
140
154
  Content-Type:
141
155
  - text/json
142
- Date:
143
- - Tue, 26 Jan 2016 20:04:25 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:30 GMT
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:33:26 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":[[1453838670,5.0]],"type":"gauge","host":"i-123456","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321206,5.0]],"type":"gauge","host":"i-123456","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:23 GMT
179
197
  Content-Type:
180
198
  - text/json
181
- Date:
182
- - Tue, 26 Jan 2016 20:04:25 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:30 GMT
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:33:26 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":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838670,"msg_title":"Chef
223
+ string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321206,"msg_title":"Chef
204
224
  completed in 5 seconds on i-123456 ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"i-123456","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
205
225
  completed in 5 seconds on i-123456 ","text":"Chef updated 0 resources out
206
226
  of 0 resources total.","host":"i-123456","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:25 GMT
242
+ - Mon, 06 Jan 2020 14:33:23 GMT
243
+ Content-Type:
244
+ - application/json
245
+ Content-Length:
246
+ - '335'
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
- - '333'
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":381236677124917119,"title":"Chef completed
261
+ string: '{"status":"ok","event":{"id":5269024571821786671,"title":"Chef completed
238
262
  in 5 seconds on i-123456 ","text":"Chef updated 0 resources out of 0 resources
239
- total.","date_happened":1453838670,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236677124917119"}}'
240
- http_version:
241
- recorded_at: Tue, 26 Jan 2016 20:04:30 GMT
263
+ total.","date_happened":1578321206,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024571821786671"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:33:26 GMT
242
266
  - request:
243
267
  method: put
244
- uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
268
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?source=chef
245
269
  body:
246
270
  encoding: UTF-8
247
271
  string: '{"tags":["env:testing"]}'
@@ -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:24 GMT
264
292
  Content-Type:
265
293
  - application/json
266
- Date:
267
- - Tue, 26 Jan 2016 20:04:25 GMT
268
- Dd-Pool:
269
- - dogweb_sameorig
294
+ Content-Length:
295
+ - '42'
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
- - Qw6ay549f1REjHQtMvVJOj5Z1lY6iWSI3exDAg0o39Y=
303
+ - sg8vzlrAXfi82gDuSEBUxkn5dG85uDtr4RhaVLNn521TM8s6JdimiKDHvX2NhFjo
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
- - '45'
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": "i-123456", "tags": ["env:testing"]}'
287
- http_version:
288
- recorded_at: Tue, 26 Jan 2016 20:04:30 GMT
289
- recorded_with: VCR 3.0.1
316
+ string: '{"host":"i-123456","tags":["env:testing"]}'
317
+ http_version:
318
+ recorded_at: Mon, 06 Jan 2020 14:33:26 GMT
319
+ recorded_with: VCR 5.0.0