chef-handler-datadog 0.9.0 → 0.10.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -0
  3. data/Appraisals +9 -1
  4. data/CHANGELOG.md +15 -0
  5. data/chef-handler-datadog.gemspec +1 -1
  6. data/gemfiles/chef_11.gemfile +2 -0
  7. data/lib/chef/handler/datadog.rb +70 -12
  8. data/lib/chef/handler/datadog_chef_events.rb +12 -20
  9. data/lib/chef/handler/datadog_chef_metrics.rb +8 -15
  10. data/lib/chef/handler/datadog_chef_tags.rb +33 -34
  11. data/lib/chef_handler_datadog.rb +1 -1
  12. data/spec/datadog_spec.rb +266 -7
  13. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +90 -12
  14. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +45 -6
  15. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +45 -6
  16. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +45 -6
  17. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +45 -6
  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 +45 -6
  19. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +45 -6
  20. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +45 -6
  21. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +45 -6
  22. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +45 -6
  23. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +45 -6
  24. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml +45 -6
  25. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/{only_emits_a_failure_metric.yml → only_emits_the_run_status_metrics.yml} +43 -4
  26. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml +43 -4
  27. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_scope_prefix.yml +290 -0
  28. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml +84 -6
  29. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_scope_prefix.yml +290 -0
  30. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml +45 -6
  31. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml +45 -6
  32. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_specified/does_not_include_the_tag_s_specified.yml +289 -0
  33. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_unspecified/should_include_all_of_the_tag_s_.yml +289 -0
  34. data/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml +45 -6
  35. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml +37 -0
  36. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml +37 -0
  37. data/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml +37 -0
  38. data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +45 -6
  39. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_events/posts_an_event.yml +575 -0
  40. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_metrics/reports_metrics.yml +575 -0
  41. data/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/sets_tags/puts_the_tags_for_the_current_node.yml +575 -0
  42. metadata +24 -11
  43. data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/does_not_emit_metrics.yml +0 -82
@@ -37,7 +37,46 @@ http_interactions:
37
37
  body:
38
38
  encoding: UTF-8
39
39
  string: '{"status": "ok"}'
40
- http_version:
40
+ http_version:
41
+ recorded_at: Tue, 26 Jan 2016 20:04:34 GMT
42
+ - request:
43
+ method: post
44
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1453838674,0.0]],"type":"counter","host":"chef.handler.datadog.test","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:29 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:
41
80
  recorded_at: Tue, 26 Jan 2016 20:04:34 GMT
42
81
  - request:
43
82
  method: post
@@ -76,7 +115,7 @@ http_interactions:
76
115
  body:
77
116
  encoding: UTF-8
78
117
  string: '{"status": "ok"}'
79
- http_version:
118
+ http_version:
80
119
  recorded_at: Tue, 26 Jan 2016 20:04:34 GMT
81
120
  - request:
82
121
  method: post
@@ -115,7 +154,7 @@ http_interactions:
115
154
  body:
116
155
  encoding: UTF-8
117
156
  string: '{"status": "ok"}'
118
- http_version:
157
+ http_version:
119
158
  recorded_at: Tue, 26 Jan 2016 20:04:34 GMT
120
159
  - request:
121
160
  method: post
@@ -154,7 +193,7 @@ http_interactions:
154
193
  body:
155
194
  encoding: UTF-8
156
195
  string: '{"status": "ok"}'
157
- http_version:
196
+ http_version:
158
197
  recorded_at: Tue, 26 Jan 2016 20:04:34 GMT
159
198
  - request:
160
199
  method: post
@@ -198,7 +237,7 @@ http_interactions:
198
237
  string: '{"status":"ok","event":{"id":381236751983296521,"title":"Chef completed
199
238
  in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources
200
239
  out of 0 resources total.","date_happened":1453838674,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236751983296521"}}'
201
- http_version:
240
+ http_version:
202
241
  recorded_at: Tue, 26 Jan 2016 20:04:34 GMT
203
242
  - request:
204
243
  method: put
@@ -245,6 +284,6 @@ http_interactions:
245
284
  body:
246
285
  encoding: UTF-8
247
286
  string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}'
248
- http_version:
287
+ http_version:
249
288
  recorded_at: Tue, 26 Jan 2016 20:04:34 GMT
250
289
  recorded_with: VCR 3.0.1
@@ -37,7 +37,46 @@ http_interactions:
37
37
  body:
38
38
  encoding: UTF-8
39
39
  string: '{"status": "ok"}'
40
- http_version:
40
+ http_version:
41
+ recorded_at: Tue, 26 Jan 2016 20:04:33 GMT
42
+ - request:
43
+ method: post
44
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1453838673,0.0]],"type":"counter","host":"chef.handler.datadog.test","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:
41
80
  recorded_at: Tue, 26 Jan 2016 20:04:33 GMT
42
81
  - request:
43
82
  method: post
@@ -76,7 +115,7 @@ http_interactions:
76
115
  body:
77
116
  encoding: UTF-8
78
117
  string: '{"status": "ok"}'
79
- http_version:
118
+ http_version:
80
119
  recorded_at: Tue, 26 Jan 2016 20:04:33 GMT
81
120
  - request:
82
121
  method: post
@@ -115,7 +154,7 @@ http_interactions:
115
154
  body:
116
155
  encoding: UTF-8
117
156
  string: '{"status": "ok"}'
118
- http_version:
157
+ http_version:
119
158
  recorded_at: Tue, 26 Jan 2016 20:04:33 GMT
120
159
  - request:
121
160
  method: post
@@ -154,7 +193,7 @@ http_interactions:
154
193
  body:
155
194
  encoding: UTF-8
156
195
  string: '{"status": "ok"}'
157
- http_version:
196
+ http_version:
158
197
  recorded_at: Tue, 26 Jan 2016 20:04:33 GMT
159
198
  - request:
160
199
  method: post
@@ -198,7 +237,7 @@ http_interactions:
198
237
  string: '{"status":"ok","event":{"id":381236727437637511,"title":"Chef completed
199
238
  in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources
200
239
  out of 0 resources total.","date_happened":1453838673,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236727437637511"}}'
201
- http_version:
240
+ http_version:
202
241
  recorded_at: Tue, 26 Jan 2016 20:04:33 GMT
203
242
  - request:
204
243
  method: put
@@ -245,6 +284,6 @@ http_interactions:
245
284
  body:
246
285
  encoding: UTF-8
247
286
  string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}'
248
- http_version:
287
+ http_version:
249
288
  recorded_at: Tue, 26 Jan 2016 20:04:33 GMT
250
289
  recorded_with: VCR 3.0.1
@@ -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":[[1453838672,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1453838672,0.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
@@ -37,7 +37,46 @@ http_interactions:
37
37
  body:
38
38
  encoding: UTF-8
39
39
  string: '{"status": "ok"}'
40
- http_version:
40
+ http_version:
41
+ recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
42
+ - request:
43
+ method: post
44
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1453838672,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","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:32 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:
41
80
  recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
42
81
  - request:
43
82
  method: post
@@ -82,7 +121,7 @@ http_interactions:
82
121
  string: '{"status":"ok","event":{"id":381236787786934568,"title":"Chef failed
83
122
  during compile phase on chef.handler.datadog.test-resources ","text":"Chef
84
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=381236787786934568"}}'
85
- http_version:
124
+ http_version:
86
125
  recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
87
126
  - request:
88
127
  method: put
@@ -129,6 +168,6 @@ http_interactions:
129
168
  body:
130
169
  encoding: UTF-8
131
170
  string: '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}'
132
- http_version:
171
+ http_version:
133
172
  recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
134
173
  recorded_with: VCR 3.0.1
@@ -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,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}'
8
+ string: '{"series":[{"metric":"chef.run.success","points":[[1453838671,0.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
@@ -37,7 +37,46 @@ http_interactions:
37
37
  body:
38
38
  encoding: UTF-8
39
39
  string: '{"status": "ok"}'
40
- http_version:
40
+ http_version:
41
+ recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
42
+ - request:
43
+ method: post
44
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1453838671,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","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:31 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:
41
80
  recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
42
81
  - request:
43
82
  method: post
@@ -82,7 +121,7 @@ http_interactions:
82
121
  string: '{"status":"ok","event":{"id":381236783340100567,"title":"Chef failed
83
122
  during compile phase on chef.handler.datadog.test-resources ","text":"Chef
84
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"}}'
85
- http_version:
124
+ http_version:
86
125
  recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
87
126
  - request:
88
127
  method: put
@@ -129,6 +168,6 @@ http_interactions:
129
168
  body:
130
169
  encoding: UTF-8
131
170
  string: '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}'
132
- http_version:
171
+ http_version:
133
172
  recorded_at: Tue, 26 Jan 2016 20:04:32 GMT
134
173
  recorded_with: VCR 3.0.1
@@ -0,0 +1,290 @@
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.success","points":[[1468585607,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","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
+ - Fri, 15 Jul 2016 12:26:42 GMT
27
+ Dd-Pool:
28
+ - propjoe
29
+ Strict-Transport-Security:
30
+ - max-age=15724800;
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ 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: Fri, 15 Jul 2016 12:26:47 GMT
42
+ - request:
43
+ method: post
44
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"series":[{"metric":"chef.run.failure","points":[[1468585607,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}'
48
+ headers:
49
+ Accept-Encoding:
50
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
51
+ Accept:
52
+ - "*/*"
53
+ User-Agent:
54
+ - Ruby
55
+ Content-Type:
56
+ - application/json
57
+ response:
58
+ status:
59
+ code: 202
60
+ message: Accepted
61
+ headers:
62
+ Content-Type:
63
+ - text/json
64
+ Date:
65
+ - Fri, 15 Jul 2016 12:26:42 GMT
66
+ Dd-Pool:
67
+ - propjoe
68
+ Strict-Transport-Security:
69
+ - max-age=15724800;
70
+ X-Content-Type-Options:
71
+ - nosniff
72
+ 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: Fri, 15 Jul 2016 12:26:47 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.total","points":[[1468585607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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
+ - Fri, 15 Jul 2016 12:26:42 GMT
105
+ Dd-Pool:
106
+ - propjoe
107
+ Strict-Transport-Security:
108
+ - max-age=15724800;
109
+ X-Content-Type-Options:
110
+ - nosniff
111
+ 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: Fri, 15 Jul 2016 12:26:47 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.updated","points":[[1468585607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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
+ - Fri, 15 Jul 2016 12:26:43 GMT
144
+ Dd-Pool:
145
+ - propjoe
146
+ Strict-Transport-Security:
147
+ - max-age=15724800;
148
+ X-Content-Type-Options:
149
+ - nosniff
150
+ 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: Fri, 15 Jul 2016 12:26:47 GMT
159
+ - request:
160
+ method: post
161
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
162
+ body:
163
+ encoding: UTF-8
164
+ string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1468585607,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}'
165
+ headers:
166
+ Accept-Encoding:
167
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
168
+ Accept:
169
+ - "*/*"
170
+ User-Agent:
171
+ - Ruby
172
+ Content-Type:
173
+ - application/json
174
+ response:
175
+ status:
176
+ code: 202
177
+ message: Accepted
178
+ headers:
179
+ Content-Type:
180
+ - text/json
181
+ Date:
182
+ - Fri, 15 Jul 2016 12:26:43 GMT
183
+ Dd-Pool:
184
+ - propjoe
185
+ Strict-Transport-Security:
186
+ - max-age=15724800;
187
+ X-Content-Type-Options:
188
+ - nosniff
189
+ Content-Length:
190
+ - '16'
191
+ Connection:
192
+ - keep-alive
193
+ body:
194
+ encoding: UTF-8
195
+ string: '{"status": "ok"}'
196
+ http_version:
197
+ recorded_at: Fri, 15 Jul 2016 12:26:47 GMT
198
+ - request:
199
+ method: post
200
+ uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
201
+ body:
202
+ encoding: UTF-8
203
+ string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1468585607,"msg_title":"Chef
204
+ completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
205
+ completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated
206
+ 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}'
207
+ headers:
208
+ Accept-Encoding:
209
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
210
+ Accept:
211
+ - "*/*"
212
+ User-Agent:
213
+ - Ruby
214
+ Content-Type:
215
+ - application/json
216
+ response:
217
+ status:
218
+ code: 202
219
+ message: Accepted
220
+ headers:
221
+ Content-Type:
222
+ - text/plain; charset=utf-8
223
+ Date:
224
+ - Fri, 15 Jul 2016 12:26:43 GMT
225
+ Dd-Pool:
226
+ - propjoe
227
+ Strict-Transport-Security:
228
+ - max-age=15724800;
229
+ X-Content-Type-Options:
230
+ - nosniff
231
+ Content-Length:
232
+ - '373'
233
+ Connection:
234
+ - keep-alive
235
+ body:
236
+ encoding: UTF-8
237
+ string: '{"status":"ok","event":{"id":628649244912460327,"title":"Chef completed
238
+ in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources
239
+ out of 0 resources total.","date_happened":1468585607,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=628649244912460327"}}'
240
+ http_version:
241
+ recorded_at: Fri, 15 Jul 2016 12:26:47 GMT
242
+ - request:
243
+ method: put
244
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
245
+ body:
246
+ encoding: UTF-8
247
+ string: '{"tags":["env:hostile","role:highlander"]}'
248
+ headers:
249
+ Accept-Encoding:
250
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
251
+ Accept:
252
+ - "*/*"
253
+ User-Agent:
254
+ - Ruby
255
+ Content-Type:
256
+ - application/json
257
+ response:
258
+ status:
259
+ code: 201
260
+ message: Created
261
+ headers:
262
+ Cache-Control:
263
+ - no-cache
264
+ Content-Type:
265
+ - application/json
266
+ Date:
267
+ - Fri, 15 Jul 2016 12:26:44 GMT
268
+ Dd-Pool:
269
+ - dogweb_sameorig
270
+ Pragma:
271
+ - no-cache
272
+ Strict-Transport-Security:
273
+ - max-age=15724800;
274
+ X-Content-Type-Options:
275
+ - nosniff
276
+ X-Dd-Debug:
277
+ - ODPlWrOS4MEcZXXD/7SPngU2RDdboMc4yDiHiqJBZz0=
278
+ X-Frame-Options:
279
+ - SAMEORIGIN
280
+ Content-Length:
281
+ - '86'
282
+ Connection:
283
+ - keep-alive
284
+ body:
285
+ encoding: UTF-8
286
+ string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile",
287
+ "role:highlander"]}'
288
+ http_version:
289
+ recorded_at: Fri, 15 Jul 2016 12:26:47 GMT
290
+ recorded_with: VCR 3.0.0