chef-handler-datadog-demo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env.example +2 -0
- data/.gitignore +63 -0
- data/.rspec +1 -0
- data/.rubocop.yml +44 -0
- data/.travis.yml +25 -0
- data/Appraisals +16 -0
- data/CHANGELOG.md +102 -0
- data/CONTRIBUTING.md +23 -0
- data/Gemfile +14 -0
- data/Guardfile +37 -0
- data/LICENSE.txt +20 -0
- data/README.md +40 -0
- data/Rakefile +23 -0
- data/chef-handler-datadog-demo.gemspec +33 -0
- data/gemfiles/chef_10.14.4.gemfile +17 -0
- data/gemfiles/chef_10.gemfile +16 -0
- data/gemfiles/chef_11.gemfile +16 -0
- data/gemfiles/chef_12.gemfile +16 -0
- data/lib/chef/handler/datadog_demo.rb +123 -0
- data/lib/chef/handler/datadog_demo_chef_events.rb +174 -0
- data/lib/chef/handler/datadog_demo_chef_metrics.rb +62 -0
- data/lib/chef/handler/datadog_demo_chef_tags.rb +140 -0
- data/lib/chef_handler_datadog_demo.rb +6 -0
- data/spec/datadog_spec.rb +495 -0
- data/spec/spec_helper.rb +47 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +513 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +258 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +258 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +143 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +250 -0
- 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 +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml +250 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/does_not_emit_metrics.yml +82 -0
- 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 +134 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml +251 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml +251 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml +251 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml +251 -0
- 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 +250 -0
- metadata +285 -0
data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml
ADDED
@@ -0,0 +1,258 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 202
|
21
|
+
message: Accepted
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- text/json
|
25
|
+
Date:
|
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
|
33
|
+
Content-Length:
|
34
|
+
- '16'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"status": "ok"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 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.resources.total","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","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
|
+
- 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
|
72
|
+
Content-Length:
|
73
|
+
- '16'
|
74
|
+
Connection:
|
75
|
+
- keep-alive
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"status": "ok"}'
|
79
|
+
http_version:
|
80
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
81
|
+
- request:
|
82
|
+
method: post
|
83
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
84
|
+
body:
|
85
|
+
encoding: UTF-8
|
86
|
+
string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
87
|
+
headers:
|
88
|
+
Accept-Encoding:
|
89
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
90
|
+
Accept:
|
91
|
+
- "*/*"
|
92
|
+
User-Agent:
|
93
|
+
- Ruby
|
94
|
+
Content-Type:
|
95
|
+
- application/json
|
96
|
+
response:
|
97
|
+
status:
|
98
|
+
code: 202
|
99
|
+
message: Accepted
|
100
|
+
headers:
|
101
|
+
Content-Type:
|
102
|
+
- text/json
|
103
|
+
Date:
|
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
|
111
|
+
Content-Length:
|
112
|
+
- '16'
|
113
|
+
Connection:
|
114
|
+
- keep-alive
|
115
|
+
body:
|
116
|
+
encoding: UTF-8
|
117
|
+
string: '{"status": "ok"}'
|
118
|
+
http_version:
|
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
|
159
|
+
- request:
|
160
|
+
method: post
|
161
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
|
162
|
+
body:
|
163
|
+
encoding: UTF-8
|
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-
|
170
|
+
[paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
171
|
+
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
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}'
|
173
|
+
headers:
|
174
|
+
Accept-Encoding:
|
175
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
176
|
+
Accept:
|
177
|
+
- "*/*"
|
178
|
+
User-Agent:
|
179
|
+
- Ruby
|
180
|
+
Content-Type:
|
181
|
+
- application/json
|
182
|
+
response:
|
183
|
+
status:
|
184
|
+
code: 202
|
185
|
+
message: Accepted
|
186
|
+
headers:
|
187
|
+
Content-Type:
|
188
|
+
- text/plain; charset=utf-8
|
189
|
+
Date:
|
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
|
197
|
+
Content-Length:
|
198
|
+
- '647'
|
199
|
+
Connection:
|
200
|
+
- keep-alive
|
201
|
+
body:
|
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]
|
205
|
+
(dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
206
|
+
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
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"}}'
|
208
|
+
http_version:
|
209
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
210
|
+
- request:
|
211
|
+
method: put
|
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
|
213
|
+
body:
|
214
|
+
encoding: UTF-8
|
215
|
+
string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
|
216
|
+
headers:
|
217
|
+
Accept-Encoding:
|
218
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
219
|
+
Accept:
|
220
|
+
- "*/*"
|
221
|
+
User-Agent:
|
222
|
+
- Ruby
|
223
|
+
Content-Type:
|
224
|
+
- application/json
|
225
|
+
response:
|
226
|
+
status:
|
227
|
+
code: 201
|
228
|
+
message: Created
|
229
|
+
headers:
|
230
|
+
Cache-Control:
|
231
|
+
- no-cache
|
232
|
+
Content-Type:
|
233
|
+
- application/json
|
234
|
+
Date:
|
235
|
+
- Tue, 26 Jan 2016 20:04:28 GMT
|
236
|
+
Dd-Pool:
|
237
|
+
- dogweb_sameorig
|
238
|
+
Pragma:
|
239
|
+
- no-cache
|
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
|
248
|
+
Content-Length:
|
249
|
+
- '112'
|
250
|
+
Connection:
|
251
|
+
- keep-alive
|
252
|
+
body:
|
253
|
+
encoding: UTF-8
|
254
|
+
string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
|
255
|
+
"role:highlander", "tag:the_one_and_only"]}'
|
256
|
+
http_version:
|
257
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
258
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,258 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 202
|
21
|
+
message: Accepted
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- text/json
|
25
|
+
Date:
|
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
|
33
|
+
Content-Length:
|
34
|
+
- '16'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"status": "ok"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 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.resources.total","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","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
|
+
- 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
|
72
|
+
Content-Length:
|
73
|
+
- '16'
|
74
|
+
Connection:
|
75
|
+
- keep-alive
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"status": "ok"}'
|
79
|
+
http_version:
|
80
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
81
|
+
- request:
|
82
|
+
method: post
|
83
|
+
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
84
|
+
body:
|
85
|
+
encoding: UTF-8
|
86
|
+
string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}'
|
87
|
+
headers:
|
88
|
+
Accept-Encoding:
|
89
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
90
|
+
Accept:
|
91
|
+
- "*/*"
|
92
|
+
User-Agent:
|
93
|
+
- Ruby
|
94
|
+
Content-Type:
|
95
|
+
- application/json
|
96
|
+
response:
|
97
|
+
status:
|
98
|
+
code: 202
|
99
|
+
message: Accepted
|
100
|
+
headers:
|
101
|
+
Content-Type:
|
102
|
+
- text/json
|
103
|
+
Date:
|
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
|
111
|
+
Content-Length:
|
112
|
+
- '16'
|
113
|
+
Connection:
|
114
|
+
- keep-alive
|
115
|
+
body:
|
116
|
+
encoding: UTF-8
|
117
|
+
string: '{"status": "ok"}'
|
118
|
+
http_version:
|
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
|
159
|
+
- request:
|
160
|
+
method: post
|
161
|
+
uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
|
162
|
+
body:
|
163
|
+
encoding: UTF-8
|
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-
|
170
|
+
[paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
171
|
+
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
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}'
|
173
|
+
headers:
|
174
|
+
Accept-Encoding:
|
175
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
176
|
+
Accept:
|
177
|
+
- "*/*"
|
178
|
+
User-Agent:
|
179
|
+
- Ruby
|
180
|
+
Content-Type:
|
181
|
+
- application/json
|
182
|
+
response:
|
183
|
+
status:
|
184
|
+
code: 202
|
185
|
+
message: Accepted
|
186
|
+
headers:
|
187
|
+
Content-Type:
|
188
|
+
- text/plain; charset=utf-8
|
189
|
+
Date:
|
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
|
197
|
+
Content-Length:
|
198
|
+
- '647'
|
199
|
+
Connection:
|
200
|
+
- keep-alive
|
201
|
+
body:
|
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]
|
205
|
+
(dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically
|
206
|
+
defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction:
|
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"}}'
|
208
|
+
http_version:
|
209
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
210
|
+
- request:
|
211
|
+
method: put
|
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
|
213
|
+
body:
|
214
|
+
encoding: UTF-8
|
215
|
+
string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
|
216
|
+
headers:
|
217
|
+
Accept-Encoding:
|
218
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
219
|
+
Accept:
|
220
|
+
- "*/*"
|
221
|
+
User-Agent:
|
222
|
+
- Ruby
|
223
|
+
Content-Type:
|
224
|
+
- application/json
|
225
|
+
response:
|
226
|
+
status:
|
227
|
+
code: 201
|
228
|
+
message: Created
|
229
|
+
headers:
|
230
|
+
Cache-Control:
|
231
|
+
- no-cache
|
232
|
+
Content-Type:
|
233
|
+
- application/json
|
234
|
+
Date:
|
235
|
+
- Tue, 26 Jan 2016 20:04:27 GMT
|
236
|
+
Dd-Pool:
|
237
|
+
- dogweb_sameorig
|
238
|
+
Pragma:
|
239
|
+
- no-cache
|
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
|
248
|
+
Content-Length:
|
249
|
+
- '112'
|
250
|
+
Connection:
|
251
|
+
- keep-alive
|
252
|
+
body:
|
253
|
+
encoding: UTF-8
|
254
|
+
string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
|
255
|
+
"role:highlander", "tag:the_one_and_only"]}'
|
256
|
+
http_version:
|
257
|
+
recorded_at: Tue, 26 Jan 2016 20:04:29 GMT
|
258
|
+
recorded_with: VCR 3.0.1
|