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":[[1468585607,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321242,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","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:57 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Fri, 15 Jul 2016 12:26:42 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: Fri, 15 Jul 2016 12:26:47 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:34:02 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":[[1468585607,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321242,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","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:57 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Fri, 15 Jul 2016 12:26:42 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: Fri, 15 Jul 2016 12:26:47 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:34:02 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":[[1468585607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321242,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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:58 GMT
101
111
  Content-Type:
102
112
  - text/json
103
- Date:
104
- - Fri, 15 Jul 2016 12:26:42 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: Fri, 15 Jul 2016 12:26:47 GMT
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:34:02 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":[[1468585607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321242,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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:58 GMT
140
154
  Content-Type:
141
155
  - text/json
142
- Date:
143
- - Fri, 15 Jul 2016 12:26:43 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: Fri, 15 Jul 2016 12:26:47 GMT
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:34:02 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":[[1468585607,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321242,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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:58 GMT
179
197
  Content-Type:
180
198
  - text/json
181
- Date:
182
- - Fri, 15 Jul 2016 12:26:43 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: Fri, 15 Jul 2016 12:26:47 GMT
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:34:02 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":1468585607,"msg_title":"Chef
223
+ string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321242,"msg_title":"Chef
204
224
  completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander"],"aggregation_key":"chef.handler.datadog.test-tags","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-tags ","text":"Chef updated
206
226
  0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","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
- - Fri, 15 Jul 2016 12:26:43 GMT
242
+ - Mon, 06 Jan 2020 14:33:59 GMT
243
+ Content-Type:
244
+ - application/json
245
+ Content-Length:
246
+ - '375'
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
- - '373'
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":628649244912460327,"title":"Chef completed
261
+ string: '{"status":"ok","event":{"id":5269025165696638327,"title":"Chef completed
238
262
  in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources
239
- out of 0 resources total.","date_happened":1468585607,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=628649244912460327"}}'
240
- http_version:
241
- recorded_at: Fri, 15 Jul 2016 12:26:47 GMT
263
+ out of 0 resources total.","date_happened":1578321242,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=5269025165696638327"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:34:02 GMT
242
266
  - request:
243
267
  method: put
244
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
268
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef
245
269
  body:
246
270
  encoding: UTF-8
247
271
  string: '{"tags":["env:hostile","role:highlander"]}'
@@ -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,32 +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:59 GMT
264
292
  Content-Type:
265
293
  - application/json
266
- Date:
267
- - Fri, 15 Jul 2016 12:26:44 GMT
268
- Dd-Pool:
269
- - dogweb_sameorig
294
+ Content-Length:
295
+ - '82'
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
- - ODPlWrOS4MEcZXXD/7SPngU2RDdboMc4yDiHiqJBZz0=
303
+ - kg+/Cls6zaJcT2blJLlU62BwgGePGdpqSwWrJ0xEIvzmSMWHXxGNsiyEzBPJ1a96
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
- - '86'
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-tags", "tags": ["env:hostile",
287
- "role:highlander"]}'
288
- http_version:
289
- recorded_at: Fri, 15 Jul 2016 12:26:47 GMT
290
- recorded_with: VCR 3.0.0
316
+ string: '{"host":"chef.handler.datadog.test-tags","tags":["env:hostile","role:highlander"]}'
317
+ http_version:
318
+ recorded_at: Mon, 06 Jan 2020 14:34:02 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":[[1458250870,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321234,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -20,70 +20,35 @@ http_interactions:
20
20
  code: 202
21
21
  message: Accepted
22
22
  headers:
23
+ Date:
24
+ - Mon, 06 Jan 2020 14:33:50 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Thu, 17 Mar 2016 21:41:05 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
37
- body:
38
- encoding: UTF-8
39
- string: '{"status": "ok"}'
40
- http_version:
41
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
42
- - request:
43
- method: post
44
- uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
45
- body:
46
- encoding: UTF-8
47
- string: '{"series":[{"metric":"chef.run.failure","points":[[1458250870,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
48
- headers:
49
- Accept-Encoding:
50
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
51
- Accept:
52
- - "*/*"
53
- User-Agent:
54
- - Ruby
55
- Content-Type:
56
- - application/json
57
- response:
58
- status:
59
- code: 202
60
- message: Accepted
61
- headers:
62
- Content-Type:
63
- - text/json
64
- Date:
65
- - Thu, 17 Mar 2016 21:41:05 GMT
66
31
  Dd-Pool:
67
32
  - propjoe
68
- Strict-Transport-Security:
69
- - max-age=15724800;
33
+ Content-Security-Policy:
34
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
70
37
  X-Content-Type-Options:
71
38
  - nosniff
72
- Content-Length:
73
- - '16'
74
- Connection:
75
- - keep-alive
39
+ Strict-Transport-Security:
40
+ - max-age=15724800;
76
41
  body:
77
42
  encoding: UTF-8
78
43
  string: '{"status": "ok"}'
79
- http_version:
80
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:33:54 GMT
81
46
  - request:
82
47
  method: post
83
48
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
84
49
  body:
85
50
  encoding: UTF-8
86
- string: '{"series":[{"metric":"chef.run.failure","points":[[1458250870,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321234,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
87
52
  headers:
88
53
  Accept-Encoding:
89
54
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -98,31 +63,35 @@ http_interactions:
98
63
  code: 202
99
64
  message: Accepted
100
65
  headers:
66
+ Date:
67
+ - Mon, 06 Jan 2020 14:33:50 GMT
101
68
  Content-Type:
102
69
  - text/json
103
- Date:
104
- - Thu, 17 Mar 2016 21:41:05 GMT
105
- Dd-Pool:
106
- - propjoe
107
- Strict-Transport-Security:
108
- - max-age=15724800;
109
- X-Content-Type-Options:
110
- - nosniff
111
70
  Content-Length:
112
71
  - '16'
113
72
  Connection:
114
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;
115
84
  body:
116
85
  encoding: UTF-8
117
86
  string: '{"status": "ok"}'
118
- http_version:
119
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:33:54 GMT
120
89
  - request:
121
90
  method: post
122
91
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
123
92
  body:
124
93
  encoding: UTF-8
125
- string: '{"series":[{"metric":"chef.resources.total","points":[[1458250870,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
94
+ string: '{"series":[{"metric":"chef.resources.total","points":[[1578321234,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
126
95
  headers:
127
96
  Accept-Encoding:
128
97
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -137,31 +106,35 @@ http_interactions:
137
106
  code: 202
138
107
  message: Accepted
139
108
  headers:
109
+ Date:
110
+ - Mon, 06 Jan 2020 14:33:50 GMT
140
111
  Content-Type:
141
112
  - text/json
142
- Date:
143
- - Thu, 17 Mar 2016 21:41:05 GMT
144
- Dd-Pool:
145
- - propjoe
146
- Strict-Transport-Security:
147
- - max-age=15724800;
148
- X-Content-Type-Options:
149
- - nosniff
150
113
  Content-Length:
151
114
  - '16'
152
115
  Connection:
153
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;
154
127
  body:
155
128
  encoding: UTF-8
156
129
  string: '{"status": "ok"}'
157
- http_version:
158
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
130
+ http_version:
131
+ recorded_at: Mon, 06 Jan 2020 14:33:54 GMT
159
132
  - request:
160
133
  method: post
161
134
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
162
135
  body:
163
136
  encoding: UTF-8
164
- string: '{"series":[{"metric":"chef.resources.updated","points":[[1458250870,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
137
+ string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321234,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
165
138
  headers:
166
139
  Accept-Encoding:
167
140
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -176,31 +149,35 @@ http_interactions:
176
149
  code: 202
177
150
  message: Accepted
178
151
  headers:
152
+ Date:
153
+ - Mon, 06 Jan 2020 14:33:51 GMT
179
154
  Content-Type:
180
155
  - text/json
181
- Date:
182
- - Thu, 17 Mar 2016 21:41:05 GMT
183
- Dd-Pool:
184
- - propjoe
185
- Strict-Transport-Security:
186
- - max-age=15724800;
187
- X-Content-Type-Options:
188
- - nosniff
189
156
  Content-Length:
190
157
  - '16'
191
158
  Connection:
192
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;
193
170
  body:
194
171
  encoding: UTF-8
195
172
  string: '{"status": "ok"}'
196
- http_version:
197
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
173
+ http_version:
174
+ recorded_at: Mon, 06 Jan 2020 14:33:54 GMT
198
175
  - request:
199
176
  method: post
200
177
  uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
201
178
  body:
202
179
  encoding: UTF-8
203
- string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1458250870,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
180
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321234,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
204
181
  headers:
205
182
  Accept-Encoding:
206
183
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -215,32 +192,36 @@ http_interactions:
215
192
  code: 202
216
193
  message: Accepted
217
194
  headers:
195
+ Date:
196
+ - Mon, 06 Jan 2020 14:33:51 GMT
218
197
  Content-Type:
219
198
  - text/json
220
- Date:
221
- - Thu, 17 Mar 2016 21:41:05 GMT
222
- Dd-Pool:
223
- - propjoe
224
- Strict-Transport-Security:
225
- - max-age=15724800;
226
- X-Content-Type-Options:
227
- - nosniff
228
199
  Content-Length:
229
200
  - '16'
230
201
  Connection:
231
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;
232
213
  body:
233
214
  encoding: UTF-8
234
215
  string: '{"status": "ok"}'
235
- http_version:
236
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
216
+ http_version:
217
+ recorded_at: Mon, 06 Jan 2020 14:33:54 GMT
237
218
  - request:
238
219
  method: post
239
220
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
240
221
  body:
241
222
  encoding: UTF-8
242
- string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1458250870,"msg_title":"Chef
243
- completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":null,"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
223
+ string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321234,"msg_title":"Chef
224
+ completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","the_one_and_only","datacenter:my-cloud"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
244
225
  completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated
245
226
  0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}'
246
227
  headers:
@@ -257,33 +238,37 @@ http_interactions:
257
238
  code: 202
258
239
  message: Accepted
259
240
  headers:
260
- Content-Type:
261
- - text/plain; charset=utf-8
262
241
  Date:
263
- - Thu, 17 Mar 2016 21:41:05 GMT
242
+ - Mon, 06 Jan 2020 14:33:51 GMT
243
+ Content-Type:
244
+ - application/json
245
+ Content-Length:
246
+ - '416'
247
+ Connection:
248
+ - keep-alive
264
249
  Dd-Pool:
265
250
  - propjoe
266
- Strict-Transport-Security:
267
- - 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
268
255
  X-Content-Type-Options:
269
256
  - nosniff
270
- Content-Length:
271
- - '344'
272
- Connection:
273
- - keep-alive
257
+ Strict-Transport-Security:
258
+ - max-age=15724800;
274
259
  body:
275
260
  encoding: UTF-8
276
- string: '{"status":"ok","event":{"id":455261105802551673,"title":"Chef completed
261
+ string: '{"status":"ok","event":{"id":5269025041618650910,"title":"Chef completed
277
262
  in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources
278
- out of 0 resources total.","date_happened":1458250870,"handle":null,"priority":"low","related_event_id":null,"tags":null,"url":"https://app.datadoghq.com/event/event?id=455261105802551673"}}'
279
- http_version:
280
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
263
+ out of 0 resources total.","date_happened":1578321234,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","the_one_and_only","datacenter:my-cloud"],"url":"https://app.datadoghq.com/event/event?id=5269025041618650910"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:33:54 GMT
281
266
  - request:
282
267
  method: put
283
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
268
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef
284
269
  body:
285
270
  encoding: UTF-8
286
- string: '{"tags":["env:hostile","role:highlander"]}'
271
+ string: '{"tags":["env:hostile","role:highlander","the_one_and_only","datacenter:my-cloud"]}'
287
272
  headers:
288
273
  Accept-Encoding:
289
274
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -291,6 +276,10 @@ http_interactions:
291
276
  - "*/*"
292
277
  User-Agent:
293
278
  - Ruby
279
+ Dd-Api-Key:
280
+ - "<API_KEY>"
281
+ Dd-Application-Key:
282
+ - "<APPLICATION_KEY>"
294
283
  Content-Type:
295
284
  - application/json
296
285
  response:
@@ -298,32 +287,33 @@ http_interactions:
298
287
  code: 201
299
288
  message: Created
300
289
  headers:
301
- Cache-Control:
302
- - no-cache
290
+ Date:
291
+ - Mon, 06 Jan 2020 14:33:52 GMT
303
292
  Content-Type:
304
293
  - application/json
305
- Date:
306
- - Thu, 17 Mar 2016 21:41:05 GMT
307
- Dd-Pool:
308
- - dogweb_sameorig
294
+ Content-Length:
295
+ - '123'
296
+ Connection:
297
+ - keep-alive
309
298
  Pragma:
310
299
  - no-cache
311
- Strict-Transport-Security:
312
- - max-age=15724800;
313
- X-Content-Type-Options:
314
- - nosniff
300
+ Cache-Control:
301
+ - no-cache
315
302
  X-Dd-Debug:
316
- - Bj/SqNU1vbZGxNGffIRtmaWe7MKGSPoKHC3+ZhLAjqk=
303
+ - hvGKayUGXeVy/DmHDcIjD3+gP6x9d+NwveU9CYPD06LgIrg7NUxobVuhZiOcmptK
304
+ Dd-Pool:
305
+ - dogweb
306
+ Content-Security-Policy:
307
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
317
308
  X-Frame-Options:
318
309
  - SAMEORIGIN
319
- Content-Length:
320
- - '86'
321
- Connection:
322
- - keep-alive
310
+ X-Content-Type-Options:
311
+ - nosniff
312
+ Strict-Transport-Security:
313
+ - max-age=15724800;
323
314
  body:
324
315
  encoding: UTF-8
325
- string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile",
326
- "role:highlander"]}'
327
- http_version:
328
- recorded_at: Thu, 17 Mar 2016 21:41:10 GMT
329
- recorded_with: VCR 3.0.1
316
+ string: '{"host":"chef.handler.datadog.test-tags","tags":["datacenter:my-cloud","role:highlander","env:hostile","the_one_and_only"]}'
317
+ http_version:
318
+ recorded_at: Mon, 06 Jan 2020 14:33:54 GMT
319
+ recorded_with: VCR 5.0.0