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":[[1453838671,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321204,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -20,31 +20,35 @@ http_interactions:
20
20
  code: 202
21
21
  message: Accepted
22
22
  headers:
23
+ Date:
24
+ - Mon, 06 Jan 2020 14:33:24 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Tue, 26 Jan 2016 20:04:31 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:32 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:33:24 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":[[1453838671,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321204,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
48
52
  headers:
49
53
  Accept-Encoding:
50
54
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -59,32 +63,36 @@ http_interactions:
59
63
  code: 202
60
64
  message: Accepted
61
65
  headers:
66
+ Date:
67
+ - Mon, 06 Jan 2020 14:33:25 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Tue, 26 Jan 2016 20:04:31 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:32 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:33:25 GMT
81
89
  - request:
82
90
  method: post
83
91
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
84
92
  body:
85
93
  encoding: UTF-8
86
94
  string: '{"msg_text":"Chef was unable to complete a run, an error during compilation
87
- may have occurred.","date_happened":1453838672,"msg_title":"Chef failed during
95
+ may have occurred.","date_happened":1578321205,"msg_title":"Chef failed during
88
96
  compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
89
97
  failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef
90
98
  was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}'
@@ -102,30 +110,34 @@ http_interactions:
102
110
  code: 202
103
111
  message: Accepted
104
112
  headers:
105
- Content-Type:
106
- - text/plain; charset=utf-8
107
113
  Date:
108
- - Tue, 26 Jan 2016 20:04:32 GMT
114
+ - Mon, 06 Jan 2020 14:33:25 GMT
115
+ Content-Type:
116
+ - application/json
117
+ Content-Length:
118
+ - '403'
119
+ Connection:
120
+ - keep-alive
109
121
  Dd-Pool:
110
122
  - propjoe
111
- Strict-Transport-Security:
112
- - max-age=15724800;
123
+ Content-Security-Policy:
124
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
125
+ X-Frame-Options:
126
+ - SAMEORIGIN
113
127
  X-Content-Type-Options:
114
128
  - nosniff
115
- Content-Length:
116
- - '401'
117
- Connection:
118
- - keep-alive
129
+ Strict-Transport-Security:
130
+ - max-age=15724800;
119
131
  body:
120
132
  encoding: UTF-8
121
- string: '{"status":"ok","event":{"id":381236783340100567,"title":"Chef failed
133
+ string: '{"status":"ok","event":{"id":5269024595980476383,"title":"Chef failed
122
134
  during compile phase on chef.handler.datadog.test-resources ","text":"Chef
123
- was unable to complete a run, an error during compilation may have occurred.","date_happened":1453838672,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=381236783340100567"}}'
124
- http_version:
125
- recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
135
+ was unable to complete a run, an error during compilation may have occurred.","date_happened":1578321205,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024595980476383"}}'
136
+ http_version:
137
+ recorded_at: Mon, 06 Jan 2020 14:33:25 GMT
126
138
  - request:
127
139
  method: put
128
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
140
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef
129
141
  body:
130
142
  encoding: UTF-8
131
143
  string: '{"tags":["env:resources"]}'
@@ -136,6 +148,10 @@ http_interactions:
136
148
  - "*/*"
137
149
  User-Agent:
138
150
  - Ruby
151
+ Dd-Api-Key:
152
+ - "<API_KEY>"
153
+ Dd-Application-Key:
154
+ - "<APPLICATION_KEY>"
139
155
  Content-Type:
140
156
  - application/json
141
157
  response:
@@ -143,31 +159,33 @@ http_interactions:
143
159
  code: 201
144
160
  message: Created
145
161
  headers:
146
- Cache-Control:
147
- - no-cache
162
+ Date:
163
+ - Mon, 06 Jan 2020 14:33:25 GMT
148
164
  Content-Type:
149
165
  - application/json
150
- Date:
151
- - Tue, 26 Jan 2016 20:04:32 GMT
152
- Dd-Pool:
153
- - dogweb_sameorig
166
+ Content-Length:
167
+ - '71'
168
+ Connection:
169
+ - keep-alive
154
170
  Pragma:
155
171
  - no-cache
156
- Strict-Transport-Security:
157
- - max-age=15724800;
158
- X-Content-Type-Options:
159
- - nosniff
172
+ Cache-Control:
173
+ - no-cache
160
174
  X-Dd-Debug:
161
- - Lqo3/ximEWPWj/q8nw5y77qbM+7c3xo1aoVdmrbBiyU=
175
+ - OxP+mFpjAbASiVhNf+t4MttAs95ZlMiGosIRnYJJGFoApNgv2oxtdzpnmNlMOki6
176
+ Dd-Pool:
177
+ - dogweb
178
+ Content-Security-Policy:
179
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
162
180
  X-Frame-Options:
163
181
  - SAMEORIGIN
164
- Content-Length:
165
- - '74'
166
- Connection:
167
- - keep-alive
182
+ X-Content-Type-Options:
183
+ - nosniff
184
+ Strict-Transport-Security:
185
+ - max-age=15724800;
168
186
  body:
169
187
  encoding: UTF-8
170
- string: '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}'
171
- http_version:
172
- recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
173
- recorded_with: VCR 3.0.1
188
+ string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}'
189
+ http_version:
190
+ recorded_at: Mon, 06 Jan 2020 14:33:25 GMT
191
+ 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":[[1485547327,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321212,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -20,31 +20,35 @@ http_interactions:
20
20
  code: 202
21
21
  message: Accepted
22
22
  headers:
23
+ Date:
24
+ - Mon, 06 Jan 2020 14:33:27 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Fri, 27 Jan 2017 20:02:02 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, 27 Jan 2017 20:02:07 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:33:32 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":[[1485547327,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321212,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
48
52
  headers:
49
53
  Accept-Encoding:
50
54
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -59,32 +63,36 @@ http_interactions:
59
63
  code: 202
60
64
  message: Accepted
61
65
  headers:
66
+ Date:
67
+ - Mon, 06 Jan 2020 14:33:27 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Fri, 27 Jan 2017 20:02:02 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, 27 Jan 2017 20:02:07 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:33:32 GMT
81
89
  - request:
82
90
  method: post
83
91
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
84
92
  body:
85
93
  encoding: UTF-8
86
94
  string: '{"msg_text":"Chef was unable to complete a run, an error during compilation
87
- may have occurred.","date_happened":1485547327,"msg_title":"Chef failed during
95
+ may have occurred.","date_happened":1578321212,"msg_title":"Chef failed during
88
96
  compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
89
97
  failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef
90
98
  was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}'
@@ -102,30 +110,34 @@ http_interactions:
102
110
  code: 202
103
111
  message: Accepted
104
112
  headers:
105
- Content-Type:
106
- - text/plain; charset=utf-8
107
113
  Date:
108
- - Fri, 27 Jan 2017 20:02:02 GMT
114
+ - Mon, 06 Jan 2020 14:33:28 GMT
115
+ Content-Type:
116
+ - application/json
117
+ Content-Length:
118
+ - '403'
119
+ Connection:
120
+ - keep-alive
109
121
  Dd-Pool:
110
122
  - propjoe
111
- Strict-Transport-Security:
112
- - max-age=15724800;
123
+ Content-Security-Policy:
124
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
125
+ X-Frame-Options:
126
+ - SAMEORIGIN
113
127
  X-Content-Type-Options:
114
128
  - nosniff
115
- Content-Length:
116
- - '401'
117
- Connection:
118
- - keep-alive
129
+ Strict-Transport-Security:
130
+ - max-age=15724800;
119
131
  body:
120
132
  encoding: UTF-8
121
- string: '{"status":"ok","event":{"id":913219659465841444,"title":"Chef failed
133
+ string: '{"status":"ok","event":{"id":5269024643832661380,"title":"Chef failed
122
134
  during compile phase on chef.handler.datadog.test-resources ","text":"Chef
123
- was unable to complete a run, an error during compilation may have occurred.","date_happened":1485547327,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=913219659465841444"}}'
124
- http_version:
125
- recorded_at: Fri, 27 Jan 2017 20:02:07 GMT
135
+ was unable to complete a run, an error during compilation may have occurred.","date_happened":1578321212,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024643832661380"}}'
136
+ http_version:
137
+ recorded_at: Mon, 06 Jan 2020 14:33:32 GMT
126
138
  - request:
127
139
  method: put
128
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
140
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef
129
141
  body:
130
142
  encoding: UTF-8
131
143
  string: '{"tags":["env:resources"]}'
@@ -136,6 +148,10 @@ http_interactions:
136
148
  - "*/*"
137
149
  User-Agent:
138
150
  - Ruby
151
+ Dd-Api-Key:
152
+ - "<API_KEY>"
153
+ Dd-Application-Key:
154
+ - "<APPLICATION_KEY>"
139
155
  Content-Type:
140
156
  - application/json
141
157
  response:
@@ -143,31 +159,33 @@ http_interactions:
143
159
  code: 201
144
160
  message: Created
145
161
  headers:
146
- Cache-Control:
147
- - no-cache
162
+ Date:
163
+ - Mon, 06 Jan 2020 14:33:28 GMT
148
164
  Content-Type:
149
165
  - application/json
150
- Date:
151
- - Fri, 27 Jan 2017 20:02:02 GMT
152
- Dd-Pool:
153
- - dogweb_sameorig
166
+ Content-Length:
167
+ - '71'
168
+ Connection:
169
+ - keep-alive
154
170
  Pragma:
155
171
  - no-cache
156
- Strict-Transport-Security:
157
- - max-age=15724800;
158
- X-Content-Type-Options:
159
- - nosniff
172
+ Cache-Control:
173
+ - no-cache
160
174
  X-Dd-Debug:
161
- - tfYTpqMVXM3M7Ic3NSslg9OvOysbx8Mrdhv4OAsMKCDdYga06HUB/8z0VnhYMv3C
175
+ - AVsav2jjRGvwjNvJeRUS7kJsgTlhh9y9smyL3UJVQTMAUoPyejdL0bVSnanIQLK4
176
+ Dd-Pool:
177
+ - dogweb
178
+ Content-Security-Policy:
179
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
162
180
  X-Frame-Options:
163
181
  - SAMEORIGIN
164
- Content-Length:
165
- - '71'
166
- Connection:
167
- - keep-alive
182
+ X-Content-Type-Options:
183
+ - nosniff
184
+ Strict-Transport-Security:
185
+ - max-age=15724800;
168
186
  body:
169
187
  encoding: UTF-8
170
188
  string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}'
171
- http_version:
172
- recorded_at: Fri, 27 Jan 2017 20:02:07 GMT
173
- recorded_with: VCR 3.0.3
189
+ http_version:
190
+ recorded_at: Mon, 06 Jan 2020 14:33:32 GMT
191
+ 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":[[1485547327,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1578321213,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -20,31 +20,35 @@ http_interactions:
20
20
  code: 202
21
21
  message: Accepted
22
22
  headers:
23
+ Date:
24
+ - Mon, 06 Jan 2020 14:33:28 GMT
23
25
  Content-Type:
24
26
  - text/json
25
- Date:
26
- - Fri, 27 Jan 2017 20:02:02 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, 27 Jan 2017 20:02:07 GMT
44
+ http_version:
45
+ recorded_at: Mon, 06 Jan 2020 14:33:33 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":[[1485547327,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
51
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1578321213,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
48
52
  headers:
49
53
  Accept-Encoding:
50
54
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -59,32 +63,36 @@ http_interactions:
59
63
  code: 202
60
64
  message: Accepted
61
65
  headers:
66
+ Date:
67
+ - Mon, 06 Jan 2020 14:33:29 GMT
62
68
  Content-Type:
63
69
  - text/json
64
- Date:
65
- - Fri, 27 Jan 2017 20:02:02 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, 27 Jan 2017 20:02:07 GMT
87
+ http_version:
88
+ recorded_at: Mon, 06 Jan 2020 14:33:33 GMT
81
89
  - request:
82
90
  method: post
83
91
  uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
84
92
  body:
85
93
  encoding: UTF-8
86
94
  string: '{"msg_text":"Chef was unable to complete a run, an error during compilation
87
- may have occurred.","date_happened":1485547327,"msg_title":"Chef failed during
95
+ may have occurred.","date_happened":1578321213,"msg_title":"Chef failed during
88
96
  compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
89
97
  failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef
90
98
  was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}'
@@ -102,30 +110,34 @@ http_interactions:
102
110
  code: 202
103
111
  message: Accepted
104
112
  headers:
105
- Content-Type:
106
- - text/plain; charset=utf-8
107
113
  Date:
108
- - Fri, 27 Jan 2017 20:02:02 GMT
114
+ - Mon, 06 Jan 2020 14:33:29 GMT
115
+ Content-Type:
116
+ - application/json
117
+ Content-Length:
118
+ - '403'
119
+ Connection:
120
+ - keep-alive
109
121
  Dd-Pool:
110
122
  - propjoe
111
- Strict-Transport-Security:
112
- - max-age=15724800;
123
+ Content-Security-Policy:
124
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
125
+ X-Frame-Options:
126
+ - SAMEORIGIN
113
127
  X-Content-Type-Options:
114
128
  - nosniff
115
- Content-Length:
116
- - '401'
117
- Connection:
118
- - keep-alive
129
+ Strict-Transport-Security:
130
+ - max-age=15724800;
119
131
  body:
120
132
  encoding: UTF-8
121
- string: '{"status":"ok","event":{"id":913219665218676295,"title":"Chef failed
133
+ string: '{"status":"ok","event":{"id":5269024667526606029,"title":"Chef failed
122
134
  during compile phase on chef.handler.datadog.test-resources ","text":"Chef
123
- was unable to complete a run, an error during compilation may have occurred.","date_happened":1485547327,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=913219665218676295"}}'
124
- http_version:
125
- recorded_at: Fri, 27 Jan 2017 20:02:07 GMT
135
+ was unable to complete a run, an error during compilation may have occurred.","date_happened":1578321213,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024667526606029"}}'
136
+ http_version:
137
+ recorded_at: Mon, 06 Jan 2020 14:33:33 GMT
126
138
  - request:
127
139
  method: put
128
- uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
140
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef
129
141
  body:
130
142
  encoding: UTF-8
131
143
  string: '{"tags":["env:resources"]}'
@@ -136,6 +148,10 @@ http_interactions:
136
148
  - "*/*"
137
149
  User-Agent:
138
150
  - Ruby
151
+ Dd-Api-Key:
152
+ - "<API_KEY>"
153
+ Dd-Application-Key:
154
+ - "<APPLICATION_KEY>"
139
155
  Content-Type:
140
156
  - application/json
141
157
  response:
@@ -143,31 +159,33 @@ http_interactions:
143
159
  code: 201
144
160
  message: Created
145
161
  headers:
146
- Cache-Control:
147
- - no-cache
162
+ Date:
163
+ - Mon, 06 Jan 2020 14:33:30 GMT
148
164
  Content-Type:
149
165
  - application/json
150
- Date:
151
- - Fri, 27 Jan 2017 20:02:02 GMT
152
- Dd-Pool:
153
- - dogweb_sameorig
166
+ Content-Length:
167
+ - '71'
168
+ Connection:
169
+ - keep-alive
154
170
  Pragma:
155
171
  - no-cache
156
- Strict-Transport-Security:
157
- - max-age=15724800;
158
- X-Content-Type-Options:
159
- - nosniff
172
+ Cache-Control:
173
+ - no-cache
160
174
  X-Dd-Debug:
161
- - gViavZoY8rjtSLcIomJIWXS+mOF/f74cR9lPqFPI7NQ=
175
+ - YKF8+1vTI0wiWlB3VWhiMVnZ1RLtV3h2yAW6/TGe9qIMWdYXxsNpy3J4QxfrJoDD
176
+ Dd-Pool:
177
+ - dogweb
178
+ Content-Security-Policy:
179
+ - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
162
180
  X-Frame-Options:
163
181
  - SAMEORIGIN
164
- Content-Length:
165
- - '71'
166
- Connection:
167
- - keep-alive
182
+ X-Content-Type-Options:
183
+ - nosniff
184
+ Strict-Transport-Security:
185
+ - max-age=15724800;
168
186
  body:
169
187
  encoding: UTF-8
170
188
  string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}'
171
- http_version:
172
- recorded_at: Fri, 27 Jan 2017 20:02:07 GMT
173
- recorded_with: VCR 3.0.3
189
+ http_version:
190
+ recorded_at: Mon, 06 Jan 2020 14:33:33 GMT
191
+ recorded_with: VCR 5.0.0