chef-handler-datadog 0.7.0 → 0.8.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.
- checksums.yaml +4 -4
- data/.env.example +2 -0
- data/CHANGELOG.md +15 -0
- data/Rakefile +7 -0
- data/lib/chef/handler/datadog.rb +1 -0
- data/lib/chef/handler/datadog_chef_metrics.rb +10 -1
- data/lib/chef/handler/datadog_chef_tags.rb +30 -9
- data/lib/chef_handler_datadog.rb +1 -1
- data/spec/datadog_spec.rb +74 -4
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +258 -122
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +129 -61
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +129 -61
- data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +124 -53
- 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 +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml +124 -53
- data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/only_emits_a_failure_metric.yml +134 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml +77 -25
- data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml +89 -43
- data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml +89 -42
- data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml +241 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml +331 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml +287 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +126 -58
- metadata +11 -2
data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml
CHANGED
@@ -5,10 +5,12 @@ 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:
|
8
|
+
string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
|
9
9
|
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
10
12
|
Accept:
|
11
|
-
-
|
13
|
+
- "*/*"
|
12
14
|
User-Agent:
|
13
15
|
- Ruby
|
14
16
|
Content-Type:
|
@@ -19,29 +21,35 @@ http_interactions:
|
|
19
21
|
message: Accepted
|
20
22
|
headers:
|
21
23
|
Content-Type:
|
22
|
-
- text/json
|
24
|
+
- text/json
|
23
25
|
Date:
|
24
|
-
- Tue,
|
25
|
-
|
26
|
-
-
|
26
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
27
|
+
Dd-Pool:
|
28
|
+
- propjoe
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=15724800;
|
31
|
+
X-Content-Type-Options:
|
32
|
+
- nosniff
|
27
33
|
Content-Length:
|
28
|
-
- '
|
34
|
+
- '16'
|
29
35
|
Connection:
|
30
36
|
- keep-alive
|
31
37
|
body:
|
32
|
-
encoding:
|
33
|
-
string:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"status": "ok"}'
|
34
40
|
http_version:
|
35
|
-
recorded_at: Tue,
|
41
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
36
42
|
- request:
|
37
43
|
method: post
|
38
44
|
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
39
45
|
body:
|
40
46
|
encoding: UTF-8
|
41
|
-
string:
|
47
|
+
string: '{"series":[{"metric":"chef.resources.total","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
42
48
|
headers:
|
49
|
+
Accept-Encoding:
|
50
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
43
51
|
Accept:
|
44
|
-
-
|
52
|
+
- "*/*"
|
45
53
|
User-Agent:
|
46
54
|
- Ruby
|
47
55
|
Content-Type:
|
@@ -52,29 +60,35 @@ http_interactions:
|
|
52
60
|
message: Accepted
|
53
61
|
headers:
|
54
62
|
Content-Type:
|
55
|
-
- text/json
|
63
|
+
- text/json
|
56
64
|
Date:
|
57
|
-
- Tue,
|
58
|
-
|
59
|
-
-
|
65
|
+
- Tue, 26 Jan 2016 20:04:28 GMT
|
66
|
+
Dd-Pool:
|
67
|
+
- propjoe
|
68
|
+
Strict-Transport-Security:
|
69
|
+
- max-age=15724800;
|
70
|
+
X-Content-Type-Options:
|
71
|
+
- nosniff
|
60
72
|
Content-Length:
|
61
|
-
- '
|
73
|
+
- '16'
|
62
74
|
Connection:
|
63
75
|
- keep-alive
|
64
76
|
body:
|
65
|
-
encoding:
|
66
|
-
string:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"status": "ok"}'
|
67
79
|
http_version:
|
68
|
-
recorded_at: Tue,
|
80
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
69
81
|
- request:
|
70
82
|
method: post
|
71
83
|
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
72
84
|
body:
|
73
85
|
encoding: UTF-8
|
74
|
-
string:
|
86
|
+
string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
75
87
|
headers:
|
88
|
+
Accept-Encoding:
|
89
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
76
90
|
Accept:
|
77
|
-
-
|
91
|
+
- "*/*"
|
78
92
|
User-Agent:
|
79
93
|
- Ruby
|
80
94
|
Content-Type:
|
@@ -85,38 +99,82 @@ http_interactions:
|
|
85
99
|
message: Accepted
|
86
100
|
headers:
|
87
101
|
Content-Type:
|
88
|
-
- text/json
|
102
|
+
- text/json
|
89
103
|
Date:
|
90
|
-
- Tue,
|
91
|
-
|
92
|
-
-
|
104
|
+
- Tue, 26 Jan 2016 20:04:28 GMT
|
105
|
+
Dd-Pool:
|
106
|
+
- propjoe
|
107
|
+
Strict-Transport-Security:
|
108
|
+
- max-age=15724800;
|
109
|
+
X-Content-Type-Options:
|
110
|
+
- nosniff
|
93
111
|
Content-Length:
|
94
|
-
- '
|
112
|
+
- '16'
|
95
113
|
Connection:
|
96
114
|
- keep-alive
|
97
115
|
body:
|
98
|
-
encoding:
|
99
|
-
string:
|
116
|
+
encoding: UTF-8
|
117
|
+
string: '{"status": "ok"}'
|
100
118
|
http_version:
|
101
|
-
recorded_at: Tue,
|
119
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
120
|
+
- request:
|
121
|
+
method: post
|
122
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
123
|
+
body:
|
124
|
+
encoding: UTF-8
|
125
|
+
string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838669,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
126
|
+
headers:
|
127
|
+
Accept-Encoding:
|
128
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
129
|
+
Accept:
|
130
|
+
- "*/*"
|
131
|
+
User-Agent:
|
132
|
+
- Ruby
|
133
|
+
Content-Type:
|
134
|
+
- application/json
|
135
|
+
response:
|
136
|
+
status:
|
137
|
+
code: 202
|
138
|
+
message: Accepted
|
139
|
+
headers:
|
140
|
+
Content-Type:
|
141
|
+
- text/json
|
142
|
+
Date:
|
143
|
+
- Tue, 26 Jan 2016 20:04:28 GMT
|
144
|
+
Dd-Pool:
|
145
|
+
- propjoe
|
146
|
+
Strict-Transport-Security:
|
147
|
+
- max-age=15724800;
|
148
|
+
X-Content-Type-Options:
|
149
|
+
- nosniff
|
150
|
+
Content-Length:
|
151
|
+
- '16'
|
152
|
+
Connection:
|
153
|
+
- keep-alive
|
154
|
+
body:
|
155
|
+
encoding: UTF-8
|
156
|
+
string: '{"status": "ok"}'
|
157
|
+
http_version:
|
158
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
102
159
|
- request:
|
103
160
|
method: post
|
104
161
|
uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
|
105
162
|
body:
|
106
163
|
encoding: UTF-8
|
107
|
-
string:
|
164
|
+
string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically
|
165
|
+
defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n-
|
166
|
+
[fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
167
|
+
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"msg_title":"Chef
|
168
|
+
failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
169
|
+
failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n-
|
108
170
|
[paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
109
171
|
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
110
|
-
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1410264905,"msg_title":"Chef
|
111
|
-
failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
112
|
-
failed in 2 seconds on chef.handler.datadog.test-failed ","text":"Chef updated
|
113
|
-
6 resources out of 6 resources total.\n$$$\n- [paws] (dynamically defined)\n-
|
114
|
-
[ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically
|
115
|
-
defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
116
172
|
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","host":"chef.handler.datadog.test-failed","device":null}'
|
117
173
|
headers:
|
174
|
+
Accept-Encoding:
|
175
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
118
176
|
Accept:
|
119
|
-
-
|
177
|
+
- "*/*"
|
120
178
|
User-Agent:
|
121
179
|
- Ruby
|
122
180
|
Content-Type:
|
@@ -127,37 +185,39 @@ http_interactions:
|
|
127
185
|
message: Accepted
|
128
186
|
headers:
|
129
187
|
Content-Type:
|
130
|
-
- text/
|
188
|
+
- text/plain; charset=utf-8
|
131
189
|
Date:
|
132
|
-
- Tue,
|
133
|
-
|
134
|
-
-
|
190
|
+
- Tue, 26 Jan 2016 20:04:28 GMT
|
191
|
+
Dd-Pool:
|
192
|
+
- propjoe
|
193
|
+
Strict-Transport-Security:
|
194
|
+
- max-age=15724800;
|
195
|
+
X-Content-Type-Options:
|
196
|
+
- nosniff
|
135
197
|
Content-Length:
|
136
|
-
- '
|
198
|
+
- '647'
|
137
199
|
Connection:
|
138
200
|
- keep-alive
|
139
201
|
body:
|
140
|
-
encoding:
|
141
|
-
string:
|
142
|
-
|
143
|
-
", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507757931012345",
|
144
|
-
"text": "Chef updated 6 resources out of 6 resources total.\n$$$\n- [paws]
|
202
|
+
encoding: UTF-8
|
203
|
+
string: '{"status":"ok","event":{"id":381236719251068806,"title":"Chef failed
|
204
|
+
in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws]
|
145
205
|
(dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
146
206
|
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
147
|
-
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n",
|
148
|
-
"tags": ["env:hostile", "role:highlander", "tag:the_one_and_only"], "related_event_id":
|
149
|
-
null, "id": 2449507757931012345}}'
|
207
|
+
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236719251068806"}}'
|
150
208
|
http_version:
|
151
|
-
recorded_at: Tue,
|
209
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
152
210
|
- request:
|
153
211
|
method: put
|
154
212
|
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
|
155
213
|
body:
|
156
214
|
encoding: UTF-8
|
157
|
-
string:
|
215
|
+
string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
|
158
216
|
headers:
|
217
|
+
Accept-Encoding:
|
218
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
159
219
|
Accept:
|
160
|
-
-
|
220
|
+
- "*/*"
|
161
221
|
User-Agent:
|
162
222
|
- Ruby
|
163
223
|
Content-Type:
|
@@ -172,19 +232,27 @@ http_interactions:
|
|
172
232
|
Content-Type:
|
173
233
|
- application/json
|
174
234
|
Date:
|
175
|
-
- Tue,
|
235
|
+
- Tue, 26 Jan 2016 20:04:28 GMT
|
236
|
+
Dd-Pool:
|
237
|
+
- dogweb_sameorig
|
176
238
|
Pragma:
|
177
239
|
- no-cache
|
178
|
-
|
179
|
-
-
|
240
|
+
Strict-Transport-Security:
|
241
|
+
- max-age=15724800;
|
242
|
+
X-Content-Type-Options:
|
243
|
+
- nosniff
|
244
|
+
X-Dd-Debug:
|
245
|
+
- 9Q+iFAw9d2jVl1KLdG/nY8rs36fWfVouK6InLAr8+BM=
|
246
|
+
X-Frame-Options:
|
247
|
+
- SAMEORIGIN
|
180
248
|
Content-Length:
|
181
249
|
- '112'
|
182
250
|
Connection:
|
183
251
|
- keep-alive
|
184
252
|
body:
|
185
|
-
encoding:
|
186
|
-
string:
|
253
|
+
encoding: UTF-8
|
254
|
+
string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
|
187
255
|
"role:highlander", "tag:the_one_and_only"]}'
|
188
256
|
http_version:
|
189
|
-
recorded_at: Tue,
|
190
|
-
recorded_with: VCR
|
257
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
258
|
+
recorded_with: VCR 3.0.1
|
data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml
CHANGED
@@ -5,10 +5,12 @@ 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:
|
8
|
+
string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
|
9
9
|
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
10
12
|
Accept:
|
11
|
-
-
|
13
|
+
- "*/*"
|
12
14
|
User-Agent:
|
13
15
|
- Ruby
|
14
16
|
Content-Type:
|
@@ -19,29 +21,35 @@ http_interactions:
|
|
19
21
|
message: Accepted
|
20
22
|
headers:
|
21
23
|
Content-Type:
|
22
|
-
- text/json
|
24
|
+
- text/json
|
23
25
|
Date:
|
24
|
-
- Tue,
|
25
|
-
|
26
|
-
-
|
26
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
27
|
+
Dd-Pool:
|
28
|
+
- propjoe
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=15724800;
|
31
|
+
X-Content-Type-Options:
|
32
|
+
- nosniff
|
27
33
|
Content-Length:
|
28
|
-
- '
|
34
|
+
- '16'
|
29
35
|
Connection:
|
30
36
|
- keep-alive
|
31
37
|
body:
|
32
|
-
encoding:
|
33
|
-
string:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"status": "ok"}'
|
34
40
|
http_version:
|
35
|
-
recorded_at: Tue,
|
41
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
36
42
|
- request:
|
37
43
|
method: post
|
38
44
|
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
39
45
|
body:
|
40
46
|
encoding: UTF-8
|
41
|
-
string:
|
47
|
+
string: '{"series":[{"metric":"chef.resources.total","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
42
48
|
headers:
|
49
|
+
Accept-Encoding:
|
50
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
43
51
|
Accept:
|
44
|
-
-
|
52
|
+
- "*/*"
|
45
53
|
User-Agent:
|
46
54
|
- Ruby
|
47
55
|
Content-Type:
|
@@ -52,29 +60,35 @@ http_interactions:
|
|
52
60
|
message: Accepted
|
53
61
|
headers:
|
54
62
|
Content-Type:
|
55
|
-
- text/json
|
63
|
+
- text/json
|
56
64
|
Date:
|
57
|
-
- Tue,
|
58
|
-
|
59
|
-
-
|
65
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
66
|
+
Dd-Pool:
|
67
|
+
- propjoe
|
68
|
+
Strict-Transport-Security:
|
69
|
+
- max-age=15724800;
|
70
|
+
X-Content-Type-Options:
|
71
|
+
- nosniff
|
60
72
|
Content-Length:
|
61
|
-
- '
|
73
|
+
- '16'
|
62
74
|
Connection:
|
63
75
|
- keep-alive
|
64
76
|
body:
|
65
|
-
encoding:
|
66
|
-
string:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"status": "ok"}'
|
67
79
|
http_version:
|
68
|
-
recorded_at: Tue,
|
80
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
69
81
|
- request:
|
70
82
|
method: post
|
71
83
|
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
72
84
|
body:
|
73
85
|
encoding: UTF-8
|
74
|
-
string:
|
86
|
+
string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
75
87
|
headers:
|
88
|
+
Accept-Encoding:
|
89
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
76
90
|
Accept:
|
77
|
-
-
|
91
|
+
- "*/*"
|
78
92
|
User-Agent:
|
79
93
|
- Ruby
|
80
94
|
Content-Type:
|
@@ -85,38 +99,82 @@ http_interactions:
|
|
85
99
|
message: Accepted
|
86
100
|
headers:
|
87
101
|
Content-Type:
|
88
|
-
- text/json
|
102
|
+
- text/json
|
89
103
|
Date:
|
90
|
-
- Tue,
|
91
|
-
|
92
|
-
-
|
104
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
105
|
+
Dd-Pool:
|
106
|
+
- propjoe
|
107
|
+
Strict-Transport-Security:
|
108
|
+
- max-age=15724800;
|
109
|
+
X-Content-Type-Options:
|
110
|
+
- nosniff
|
93
111
|
Content-Length:
|
94
|
-
- '
|
112
|
+
- '16'
|
95
113
|
Connection:
|
96
114
|
- keep-alive
|
97
115
|
body:
|
98
|
-
encoding:
|
99
|
-
string:
|
116
|
+
encoding: UTF-8
|
117
|
+
string: '{"status": "ok"}'
|
100
118
|
http_version:
|
101
|
-
recorded_at: Tue,
|
119
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
120
|
+
- request:
|
121
|
+
method: post
|
122
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
123
|
+
body:
|
124
|
+
encoding: UTF-8
|
125
|
+
string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838669,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
126
|
+
headers:
|
127
|
+
Accept-Encoding:
|
128
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
129
|
+
Accept:
|
130
|
+
- "*/*"
|
131
|
+
User-Agent:
|
132
|
+
- Ruby
|
133
|
+
Content-Type:
|
134
|
+
- application/json
|
135
|
+
response:
|
136
|
+
status:
|
137
|
+
code: 202
|
138
|
+
message: Accepted
|
139
|
+
headers:
|
140
|
+
Content-Type:
|
141
|
+
- text/json
|
142
|
+
Date:
|
143
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
144
|
+
Dd-Pool:
|
145
|
+
- propjoe
|
146
|
+
Strict-Transport-Security:
|
147
|
+
- max-age=15724800;
|
148
|
+
X-Content-Type-Options:
|
149
|
+
- nosniff
|
150
|
+
Content-Length:
|
151
|
+
- '16'
|
152
|
+
Connection:
|
153
|
+
- keep-alive
|
154
|
+
body:
|
155
|
+
encoding: UTF-8
|
156
|
+
string: '{"status": "ok"}'
|
157
|
+
http_version:
|
158
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
102
159
|
- request:
|
103
160
|
method: post
|
104
161
|
uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
|
105
162
|
body:
|
106
163
|
encoding: UTF-8
|
107
|
-
string:
|
164
|
+
string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically
|
165
|
+
defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n-
|
166
|
+
[fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
167
|
+
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"msg_title":"Chef
|
168
|
+
failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
169
|
+
failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n-
|
108
170
|
[paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
109
171
|
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
110
|
-
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1410264908,"msg_title":"Chef
|
111
|
-
failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
112
|
-
failed in 2 seconds on chef.handler.datadog.test-failed ","text":"Chef updated
|
113
|
-
6 resources out of 6 resources total.\n$$$\n- [paws] (dynamically defined)\n-
|
114
|
-
[ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically
|
115
|
-
defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
116
172
|
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","host":"chef.handler.datadog.test-failed","device":null}'
|
117
173
|
headers:
|
174
|
+
Accept-Encoding:
|
175
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
118
176
|
Accept:
|
119
|
-
-
|
177
|
+
- "*/*"
|
120
178
|
User-Agent:
|
121
179
|
- Ruby
|
122
180
|
Content-Type:
|
@@ -127,37 +185,39 @@ http_interactions:
|
|
127
185
|
message: Accepted
|
128
186
|
headers:
|
129
187
|
Content-Type:
|
130
|
-
- text/
|
188
|
+
- text/plain; charset=utf-8
|
131
189
|
Date:
|
132
|
-
- Tue,
|
133
|
-
|
134
|
-
-
|
190
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
191
|
+
Dd-Pool:
|
192
|
+
- propjoe
|
193
|
+
Strict-Transport-Security:
|
194
|
+
- max-age=15724800;
|
195
|
+
X-Content-Type-Options:
|
196
|
+
- nosniff
|
135
197
|
Content-Length:
|
136
|
-
- '
|
198
|
+
- '647'
|
137
199
|
Connection:
|
138
200
|
- keep-alive
|
139
201
|
body:
|
140
|
-
encoding:
|
141
|
-
string:
|
142
|
-
|
143
|
-
", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507804185796858",
|
144
|
-
"text": "Chef updated 6 resources out of 6 resources total.\n$$$\n- [paws]
|
202
|
+
encoding: UTF-8
|
203
|
+
string: '{"status":"ok","event":{"id":381236709941151618,"title":"Chef failed
|
204
|
+
in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws]
|
145
205
|
(dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
146
206
|
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
147
|
-
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n",
|
148
|
-
"tags": ["env:hostile", "role:highlander", "tag:the_one_and_only"], "related_event_id":
|
149
|
-
null, "id": 2449507804185796858}}'
|
207
|
+
Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236709941151618"}}'
|
150
208
|
http_version:
|
151
|
-
recorded_at: Tue,
|
209
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
152
210
|
- request:
|
153
211
|
method: put
|
154
212
|
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
|
155
213
|
body:
|
156
214
|
encoding: UTF-8
|
157
|
-
string:
|
215
|
+
string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
|
158
216
|
headers:
|
217
|
+
Accept-Encoding:
|
218
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
159
219
|
Accept:
|
160
|
-
-
|
220
|
+
- "*/*"
|
161
221
|
User-Agent:
|
162
222
|
- Ruby
|
163
223
|
Content-Type:
|
@@ -172,19 +232,27 @@ http_interactions:
|
|
172
232
|
Content-Type:
|
173
233
|
- application/json
|
174
234
|
Date:
|
175
|
-
- Tue,
|
235
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
236
|
+
Dd-Pool:
|
237
|
+
- dogweb_sameorig
|
176
238
|
Pragma:
|
177
239
|
- no-cache
|
178
|
-
|
179
|
-
-
|
240
|
+
Strict-Transport-Security:
|
241
|
+
- max-age=15724800;
|
242
|
+
X-Content-Type-Options:
|
243
|
+
- nosniff
|
244
|
+
X-Dd-Debug:
|
245
|
+
- 9Q+iFAw9d2jVl1KLdG/nY8rs36fWfVouK6InLAr8+BM=
|
246
|
+
X-Frame-Options:
|
247
|
+
- SAMEORIGIN
|
180
248
|
Content-Length:
|
181
249
|
- '112'
|
182
250
|
Connection:
|
183
251
|
- keep-alive
|
184
252
|
body:
|
185
|
-
encoding:
|
186
|
-
string:
|
253
|
+
encoding: UTF-8
|
254
|
+
string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
|
187
255
|
"role:highlander", "tag:the_one_and_only"]}'
|
188
256
|
http_version:
|
189
|
-
recorded_at: Tue,
|
190
|
-
recorded_with: VCR
|
257
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
258
|
+
recorded_with: VCR 3.0.1
|