chef-handler-datadog 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +9 -9
  2. data/.gitignore +4 -3
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +36 -0
  5. data/.travis.yml +7 -2
  6. data/Appraisals +24 -0
  7. data/CHANGELOG.md +23 -0
  8. data/Gemfile +7 -1
  9. data/README.md +16 -3
  10. data/Rakefile +7 -7
  11. data/chef-handler-datadog.gemspec +17 -12
  12. data/gemfiles/chef_10.14.0.gemfile +12 -0
  13. data/gemfiles/chef_10.26.0.gemfile +13 -0
  14. data/gemfiles/chef_10.30.2.gemfile +12 -0
  15. data/gemfiles/chef_11.8.2.gemfile +13 -0
  16. data/lib/chef-handler-datadog.rb +4 -1
  17. data/lib/chef/handler/datadog.rb +112 -89
  18. data/spec/datadog_spec.rb +279 -0
  19. data/spec/spec_helper.rb +48 -0
  20. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +218 -0
  21. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +218 -0
  22. data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +142 -0
  23. data/spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml +215 -0
  24. 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 +214 -0
  25. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +214 -0
  26. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +214 -0
  27. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +214 -0
  28. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +214 -0
  29. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +214 -0
  30. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/gets_the_tags_for_the_current_node.yml +214 -0
  31. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/puts_the_tags_for_the_current_node.yml +214 -0
  32. data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +217 -0
  33. metadata +102 -15
  34. data/gemfiles/Gemfile.chef-10 +0 -5
  35. data/gemfiles/Gemfile.chef-11 +0 -5
  36. data/test/helper.rb +0 -18
  37. data/test/test_chef-handler-datadog.rb +0 -7
@@ -0,0 +1,214 @@
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.resources.total","points":[[1390096469,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}'
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 202
19
+ message: Accepted
20
+ headers:
21
+ Content-Type:
22
+ - text/json; charset=UTF-8
23
+ Date:
24
+ - Sun, 19 Jan 2014 01:54:16 GMT
25
+ Server:
26
+ - dogdispatcher/4.10.0
27
+ Content-Length:
28
+ - '15'
29
+ Connection:
30
+ - keep-alive
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! '{"status":"ok"}'
34
+ http_version:
35
+ recorded_at: Sun, 19 Jan 2014 01:54:29 GMT
36
+ - request:
37
+ method: post
38
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
39
+ body:
40
+ encoding: UTF-8
41
+ string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1390096469,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}'
42
+ headers:
43
+ Accept:
44
+ - ! '*/*'
45
+ User-Agent:
46
+ - Ruby
47
+ Content-Type:
48
+ - application/json
49
+ response:
50
+ status:
51
+ code: 202
52
+ message: Accepted
53
+ headers:
54
+ Content-Type:
55
+ - text/json; charset=UTF-8
56
+ Date:
57
+ - Sun, 19 Jan 2014 01:54:16 GMT
58
+ Server:
59
+ - dogdispatcher/4.10.0
60
+ Content-Length:
61
+ - '15'
62
+ Connection:
63
+ - keep-alive
64
+ body:
65
+ encoding: US-ASCII
66
+ string: ! '{"status":"ok"}'
67
+ http_version:
68
+ recorded_at: Sun, 19 Jan 2014 01:54:29 GMT
69
+ - request:
70
+ method: post
71
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
72
+ body:
73
+ encoding: UTF-8
74
+ string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1390096469,5.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}'
75
+ headers:
76
+ Accept:
77
+ - ! '*/*'
78
+ User-Agent:
79
+ - Ruby
80
+ Content-Type:
81
+ - application/json
82
+ response:
83
+ status:
84
+ code: 202
85
+ message: Accepted
86
+ headers:
87
+ Content-Type:
88
+ - text/json; charset=UTF-8
89
+ Date:
90
+ - Sun, 19 Jan 2014 01:54:16 GMT
91
+ Server:
92
+ - dogdispatcher/4.10.0
93
+ Content-Length:
94
+ - '15'
95
+ Connection:
96
+ - keep-alive
97
+ body:
98
+ encoding: US-ASCII
99
+ string: ! '{"status":"ok"}'
100
+ http_version:
101
+ recorded_at: Sun, 19 Jan 2014 01:54:29 GMT
102
+ - request:
103
+ method: post
104
+ uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
105
+ body:
106
+ encoding: UTF-8
107
+ string: ! '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1390096469,"msg_title":"Chef
108
+ completed in 5 seconds on chef.handler.datadog.test-ec2 ","priority":"low","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-ec2","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
109
+ completed in 5 seconds on chef.handler.datadog.test-ec2 ","text":"Chef updated
110
+ 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-ec2","device":null}'
111
+ headers:
112
+ Accept:
113
+ - ! '*/*'
114
+ User-Agent:
115
+ - Ruby
116
+ Content-Type:
117
+ - application/json
118
+ response:
119
+ status:
120
+ code: 202
121
+ message: Accepted
122
+ headers:
123
+ Content-Type:
124
+ - text/json; charset=UTF-8
125
+ Date:
126
+ - Sun, 19 Jan 2014 01:54:17 GMT
127
+ Server:
128
+ - dogdispatcher/4.10.0
129
+ Content-Length:
130
+ - '371'
131
+ Connection:
132
+ - keep-alive
133
+ body:
134
+ encoding: US-ASCII
135
+ string: ! '{"status": "ok", "event": {"priority": "low", "date_happened": 1390096469,
136
+ "handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-ec2
137
+ ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2111137341480881391",
138
+ "text": "Chef updated 0 resources out of 0 resources total.", "tags": [],
139
+ "related_event_id": null, "id": 2111137341480881391}}'
140
+ http_version:
141
+ recorded_at: Sun, 19 Jan 2014 01:54:29 GMT
142
+ - request:
143
+ method: get
144
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-ec2?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ''
148
+ headers:
149
+ Accept:
150
+ - ! '*/*'
151
+ User-Agent:
152
+ - Ruby
153
+ response:
154
+ status:
155
+ code: 200
156
+ message: OK
157
+ headers:
158
+ Cache-Control:
159
+ - no-cache
160
+ Content-Type:
161
+ - application/json
162
+ Date:
163
+ - Sun, 19 Jan 2014 01:54:17 GMT
164
+ Pragma:
165
+ - no-cache
166
+ Server:
167
+ - gunicorn/0.17.4
168
+ Content-Length:
169
+ - '25'
170
+ Connection:
171
+ - keep-alive
172
+ body:
173
+ encoding: US-ASCII
174
+ string: ! '{"tags": ["env:testing"]}'
175
+ http_version:
176
+ recorded_at: Sun, 19 Jan 2014 01:54:29 GMT
177
+ - request:
178
+ method: put
179
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-ec2?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
180
+ body:
181
+ encoding: UTF-8
182
+ string: ! '{"tags":["env:testing"]}'
183
+ headers:
184
+ Accept:
185
+ - ! '*/*'
186
+ User-Agent:
187
+ - Ruby
188
+ Content-Type:
189
+ - application/json
190
+ response:
191
+ status:
192
+ code: 201
193
+ message: Created
194
+ headers:
195
+ Cache-Control:
196
+ - no-cache
197
+ Content-Type:
198
+ - application/json
199
+ Date:
200
+ - Sun, 19 Jan 2014 01:54:17 GMT
201
+ Pragma:
202
+ - no-cache
203
+ Server:
204
+ - gunicorn/0.17.4
205
+ Content-Length:
206
+ - '66'
207
+ Connection:
208
+ - keep-alive
209
+ body:
210
+ encoding: US-ASCII
211
+ string: ! '{"host": "chef.handler.datadog.test-ec2", "tags": ["env:testing"]}'
212
+ http_version:
213
+ recorded_at: Sun, 19 Jan 2014 01:54:29 GMT
214
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,214 @@
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.resources.total","points":[[1390096471,0.0]],"type":"gauge","host":"i-123456","device":null}]}'
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 202
19
+ message: Accepted
20
+ headers:
21
+ Content-Type:
22
+ - text/json; charset=UTF-8
23
+ Date:
24
+ - Sun, 19 Jan 2014 01:54:18 GMT
25
+ Server:
26
+ - dogdispatcher/4.10.0
27
+ Content-Length:
28
+ - '15'
29
+ Connection:
30
+ - keep-alive
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! '{"status":"ok"}'
34
+ http_version:
35
+ recorded_at: Sun, 19 Jan 2014 01:54:31 GMT
36
+ - request:
37
+ method: post
38
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
39
+ body:
40
+ encoding: UTF-8
41
+ string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1390096471,0.0]],"type":"gauge","host":"i-123456","device":null}]}'
42
+ headers:
43
+ Accept:
44
+ - ! '*/*'
45
+ User-Agent:
46
+ - Ruby
47
+ Content-Type:
48
+ - application/json
49
+ response:
50
+ status:
51
+ code: 202
52
+ message: Accepted
53
+ headers:
54
+ Content-Type:
55
+ - text/json; charset=UTF-8
56
+ Date:
57
+ - Sun, 19 Jan 2014 01:54:19 GMT
58
+ Server:
59
+ - dogdispatcher/4.10.0
60
+ Content-Length:
61
+ - '15'
62
+ Connection:
63
+ - keep-alive
64
+ body:
65
+ encoding: US-ASCII
66
+ string: ! '{"status":"ok"}'
67
+ http_version:
68
+ recorded_at: Sun, 19 Jan 2014 01:54:31 GMT
69
+ - request:
70
+ method: post
71
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
72
+ body:
73
+ encoding: UTF-8
74
+ string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1390096471,5.0]],"type":"gauge","host":"i-123456","device":null}]}'
75
+ headers:
76
+ Accept:
77
+ - ! '*/*'
78
+ User-Agent:
79
+ - Ruby
80
+ Content-Type:
81
+ - application/json
82
+ response:
83
+ status:
84
+ code: 202
85
+ message: Accepted
86
+ headers:
87
+ Content-Type:
88
+ - text/json; charset=UTF-8
89
+ Date:
90
+ - Sun, 19 Jan 2014 01:54:19 GMT
91
+ Server:
92
+ - dogdispatcher/4.10.0
93
+ Content-Length:
94
+ - '15'
95
+ Connection:
96
+ - keep-alive
97
+ body:
98
+ encoding: US-ASCII
99
+ string: ! '{"status":"ok"}'
100
+ http_version:
101
+ recorded_at: Sun, 19 Jan 2014 01:54:31 GMT
102
+ - request:
103
+ method: post
104
+ uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
105
+ body:
106
+ encoding: UTF-8
107
+ string: ! '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1390096471,"msg_title":"Chef
108
+ completed in 5 seconds on i-123456 ","priority":"low","parent":null,"tags":[],"aggregation_key":"i-123456","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
109
+ completed in 5 seconds on i-123456 ","text":"Chef updated 0 resources out
110
+ of 0 resources total.","host":"i-123456","device":null}'
111
+ headers:
112
+ Accept:
113
+ - ! '*/*'
114
+ User-Agent:
115
+ - Ruby
116
+ Content-Type:
117
+ - application/json
118
+ response:
119
+ status:
120
+ code: 202
121
+ message: Accepted
122
+ headers:
123
+ Content-Type:
124
+ - text/json; charset=UTF-8
125
+ Date:
126
+ - Sun, 19 Jan 2014 01:54:19 GMT
127
+ Server:
128
+ - dogdispatcher/4.10.0
129
+ Content-Length:
130
+ - '350'
131
+ Connection:
132
+ - keep-alive
133
+ body:
134
+ encoding: US-ASCII
135
+ string: ! '{"status": "ok", "event": {"priority": "low", "date_happened": 1390096471,
136
+ "handle": null, "title": "Chef completed in 5 seconds on i-123456 ", "url":
137
+ "https://app.datadoghq.com/event/jump_to?event_id=2111137381846863054", "text":
138
+ "Chef updated 0 resources out of 0 resources total.", "tags": [], "related_event_id":
139
+ null, "id": 2111137381846863054}}'
140
+ http_version:
141
+ recorded_at: Sun, 19 Jan 2014 01:54:31 GMT
142
+ - request:
143
+ method: get
144
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ''
148
+ headers:
149
+ Accept:
150
+ - ! '*/*'
151
+ User-Agent:
152
+ - Ruby
153
+ response:
154
+ status:
155
+ code: 200
156
+ message: OK
157
+ headers:
158
+ Cache-Control:
159
+ - no-cache
160
+ Content-Type:
161
+ - application/json
162
+ Date:
163
+ - Sun, 19 Jan 2014 01:54:19 GMT
164
+ Pragma:
165
+ - no-cache
166
+ Server:
167
+ - gunicorn/0.17.4
168
+ Content-Length:
169
+ - '25'
170
+ Connection:
171
+ - keep-alive
172
+ body:
173
+ encoding: US-ASCII
174
+ string: ! '{"tags": ["env:testing"]}'
175
+ http_version:
176
+ recorded_at: Sun, 19 Jan 2014 01:54:31 GMT
177
+ - request:
178
+ method: put
179
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
180
+ body:
181
+ encoding: UTF-8
182
+ string: ! '{"tags":["env:testing"]}'
183
+ headers:
184
+ Accept:
185
+ - ! '*/*'
186
+ User-Agent:
187
+ - Ruby
188
+ Content-Type:
189
+ - application/json
190
+ response:
191
+ status:
192
+ code: 201
193
+ message: Created
194
+ headers:
195
+ Cache-Control:
196
+ - no-cache
197
+ Content-Type:
198
+ - application/json
199
+ Date:
200
+ - Sun, 19 Jan 2014 01:54:20 GMT
201
+ Pragma:
202
+ - no-cache
203
+ Server:
204
+ - gunicorn/0.17.4
205
+ Content-Length:
206
+ - '45'
207
+ Connection:
208
+ - keep-alive
209
+ body:
210
+ encoding: US-ASCII
211
+ string: ! '{"host": "i-123456", "tags": ["env:testing"]}'
212
+ http_version:
213
+ recorded_at: Sun, 19 Jan 2014 01:54:31 GMT
214
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,214 @@
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.resources.total","points":[[1390096474,0.0]],"type":"gauge","host":"i-123456","device":null}]}'
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 202
19
+ message: Accepted
20
+ headers:
21
+ Content-Type:
22
+ - text/json; charset=UTF-8
23
+ Date:
24
+ - Sun, 19 Jan 2014 01:54:20 GMT
25
+ Server:
26
+ - dogdispatcher/4.10.0
27
+ Content-Length:
28
+ - '15'
29
+ Connection:
30
+ - keep-alive
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! '{"status":"ok"}'
34
+ http_version:
35
+ recorded_at: Sun, 19 Jan 2014 01:54:34 GMT
36
+ - request:
37
+ method: post
38
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
39
+ body:
40
+ encoding: UTF-8
41
+ string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1390096474,0.0]],"type":"gauge","host":"i-123456","device":null}]}'
42
+ headers:
43
+ Accept:
44
+ - ! '*/*'
45
+ User-Agent:
46
+ - Ruby
47
+ Content-Type:
48
+ - application/json
49
+ response:
50
+ status:
51
+ code: 202
52
+ message: Accepted
53
+ headers:
54
+ Content-Type:
55
+ - text/json; charset=UTF-8
56
+ Date:
57
+ - Sun, 19 Jan 2014 01:54:21 GMT
58
+ Server:
59
+ - dogdispatcher/4.10.0
60
+ Content-Length:
61
+ - '15'
62
+ Connection:
63
+ - keep-alive
64
+ body:
65
+ encoding: US-ASCII
66
+ string: ! '{"status":"ok"}'
67
+ http_version:
68
+ recorded_at: Sun, 19 Jan 2014 01:54:34 GMT
69
+ - request:
70
+ method: post
71
+ uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
72
+ body:
73
+ encoding: UTF-8
74
+ string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1390096474,5.0]],"type":"gauge","host":"i-123456","device":null}]}'
75
+ headers:
76
+ Accept:
77
+ - ! '*/*'
78
+ User-Agent:
79
+ - Ruby
80
+ Content-Type:
81
+ - application/json
82
+ response:
83
+ status:
84
+ code: 202
85
+ message: Accepted
86
+ headers:
87
+ Content-Type:
88
+ - text/json; charset=UTF-8
89
+ Date:
90
+ - Sun, 19 Jan 2014 01:54:21 GMT
91
+ Server:
92
+ - dogdispatcher/4.10.0
93
+ Content-Length:
94
+ - '15'
95
+ Connection:
96
+ - keep-alive
97
+ body:
98
+ encoding: US-ASCII
99
+ string: ! '{"status":"ok"}'
100
+ http_version:
101
+ recorded_at: Sun, 19 Jan 2014 01:54:34 GMT
102
+ - request:
103
+ method: post
104
+ uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
105
+ body:
106
+ encoding: UTF-8
107
+ string: ! '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1390096474,"msg_title":"Chef
108
+ completed in 5 seconds on i-123456 ","priority":"low","parent":null,"tags":[],"aggregation_key":"i-123456","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
109
+ completed in 5 seconds on i-123456 ","text":"Chef updated 0 resources out
110
+ of 0 resources total.","host":"i-123456","device":null}'
111
+ headers:
112
+ Accept:
113
+ - ! '*/*'
114
+ User-Agent:
115
+ - Ruby
116
+ Content-Type:
117
+ - application/json
118
+ response:
119
+ status:
120
+ code: 202
121
+ message: Accepted
122
+ headers:
123
+ Content-Type:
124
+ - text/json; charset=UTF-8
125
+ Date:
126
+ - Sun, 19 Jan 2014 01:54:22 GMT
127
+ Server:
128
+ - dogdispatcher/4.10.0
129
+ Content-Length:
130
+ - '350'
131
+ Connection:
132
+ - keep-alive
133
+ body:
134
+ encoding: US-ASCII
135
+ string: ! '{"status": "ok", "event": {"priority": "low", "date_happened": 1390096474,
136
+ "handle": null, "title": "Chef completed in 5 seconds on i-123456 ", "url":
137
+ "https://app.datadoghq.com/event/jump_to?event_id=2111137422112308464", "text":
138
+ "Chef updated 0 resources out of 0 resources total.", "tags": [], "related_event_id":
139
+ null, "id": 2111137422112308464}}'
140
+ http_version:
141
+ recorded_at: Sun, 19 Jan 2014 01:54:34 GMT
142
+ - request:
143
+ method: get
144
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ''
148
+ headers:
149
+ Accept:
150
+ - ! '*/*'
151
+ User-Agent:
152
+ - Ruby
153
+ response:
154
+ status:
155
+ code: 200
156
+ message: OK
157
+ headers:
158
+ Cache-Control:
159
+ - no-cache
160
+ Content-Type:
161
+ - application/json
162
+ Date:
163
+ - Sun, 19 Jan 2014 01:54:22 GMT
164
+ Pragma:
165
+ - no-cache
166
+ Server:
167
+ - gunicorn/0.17.4
168
+ Content-Length:
169
+ - '25'
170
+ Connection:
171
+ - keep-alive
172
+ body:
173
+ encoding: US-ASCII
174
+ string: ! '{"tags": ["env:testing"]}'
175
+ http_version:
176
+ recorded_at: Sun, 19 Jan 2014 01:54:34 GMT
177
+ - request:
178
+ method: put
179
+ uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
180
+ body:
181
+ encoding: UTF-8
182
+ string: ! '{"tags":["env:testing"]}'
183
+ headers:
184
+ Accept:
185
+ - ! '*/*'
186
+ User-Agent:
187
+ - Ruby
188
+ Content-Type:
189
+ - application/json
190
+ response:
191
+ status:
192
+ code: 201
193
+ message: Created
194
+ headers:
195
+ Cache-Control:
196
+ - no-cache
197
+ Content-Type:
198
+ - application/json
199
+ Date:
200
+ - Sun, 19 Jan 2014 01:54:22 GMT
201
+ Pragma:
202
+ - no-cache
203
+ Server:
204
+ - gunicorn/0.17.4
205
+ Content-Length:
206
+ - '45'
207
+ Connection:
208
+ - keep-alive
209
+ body:
210
+ encoding: US-ASCII
211
+ string: ! '{"host": "i-123456", "tags": ["env:testing"]}'
212
+ http_version:
213
+ recorded_at: Sun, 19 Jan 2014 01:54:34 GMT
214
+ recorded_with: VCR 2.8.0