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":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321199,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:14 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:19 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":[[1578321199,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:15 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:19 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":[[1578321199,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:15 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:19 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":[[1578321199,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:15 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:19 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":[[1578321199,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:16 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:19 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":1578321199,"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,71 +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:16 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
249
+ Dd-Pool:
250
+ - propjoe
251
+ Content-Security-Policy:
252
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
253
+ X-Frame-Options:
254
+ - SAMEORIGIN
255
+ X-Content-Type-Options:
256
+ - nosniff
257
+ Strict-Transport-Security:
258
+ - max-age=15724800;
273
259
  body:
274
260
  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
- recorded_with: VCR 2.9.3
261
+ string: '{"status":"ok","event":{"id":5269024450948964660,"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":1578321199,"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=5269024450948964660"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:33:19 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":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321195,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:10 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:15 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":[[1578321195,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:10 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:15 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":[[1578321195,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:11 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:15 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":[[1578321195,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:11 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:15 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":[[1578321195,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:12 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:15 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":1578321195,"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,161 +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:12 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: 404
296
- message: Not Found
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
- - '44'
316
- Connection:
317
- - keep-alive
318
- body:
319
- encoding: UTF-8
320
- string: '{"errors": ["No host matches that host_id"]}'
321
- http_version:
322
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
323
- - request:
324
- method: put
325
- 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
326
- body:
327
- encoding: UTF-8
328
- string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
329
- headers:
330
- Accept-Encoding:
331
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
332
- Accept:
333
- - "*/*"
334
- User-Agent:
335
- - Ruby
336
- Content-Type:
337
- - application/json
338
- response:
339
- status:
340
- code: 404
341
- message: Not Found
342
- headers:
343
- Cache-Control:
344
- - no-cache
345
- Content-Type:
346
- - application/json
347
- Date:
348
- - Sun, 05 Apr 2015 15:49:24 GMT
349
- Pragma:
350
- - no-cache
351
- Server:
352
- - gunicorn/19.1.0
255
+ X-Content-Type-Options:
256
+ - nosniff
353
257
  Strict-Transport-Security:
354
258
  - max-age=15724800;
355
- X-Dd-Debug:
356
- - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8=
357
- X-Frame-Options:
358
- - SAMEORIGIN
359
- Content-Length:
360
- - '44'
361
- Connection:
362
- - keep-alive
363
259
  body:
364
260
  encoding: UTF-8
365
- string: '{"errors": ["No host matches that host_id"]}'
366
- http_version:
367
- recorded_at: Sun, 05 Apr 2015 15:49:26 GMT
368
- recorded_with: VCR 2.9.3
261
+ string: '{"status":"ok","event":{"id":5269024378120001608,"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":1578321195,"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=5269024378120001608"}}'
264
+ http_version:
265
+ recorded_at: Mon, 06 Jan 2020 14:33:15 GMT
266
+ recorded_with: VCR 5.0.0