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.
- checksums.yaml +9 -9
- data/.gitignore +4 -3
- data/.rspec +1 -0
- data/.rubocop.yml +36 -0
- data/.travis.yml +7 -2
- data/Appraisals +24 -0
- data/CHANGELOG.md +23 -0
- data/Gemfile +7 -1
- data/README.md +16 -3
- data/Rakefile +7 -7
- data/chef-handler-datadog.gemspec +17 -12
- data/gemfiles/chef_10.14.0.gemfile +12 -0
- data/gemfiles/chef_10.26.0.gemfile +13 -0
- data/gemfiles/chef_10.30.2.gemfile +12 -0
- data/gemfiles/chef_11.8.2.gemfile +13 -0
- data/lib/chef-handler-datadog.rb +4 -1
- data/lib/chef/handler/datadog.rb +112 -89
- data/spec/datadog_spec.rb +279 -0
- data/spec/spec_helper.rb +48 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +218 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +218 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +142 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml +215 -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 +214 -0
- 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
- 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
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +214 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +214 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +214 -0
- 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
- 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
- data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +217 -0
- metadata +102 -15
- data/gemfiles/Gemfile.chef-10 +0 -5
- data/gemfiles/Gemfile.chef-11 +0 -5
- data/test/helper.rb +0 -18
- data/test/test_chef-handler-datadog.rb +0 -7
@@ -0,0 +1,218 @@
|
|
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":[[1390096500,0.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","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:50 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:55:00 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":[[1390096500,0.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","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:50 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:55:00 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":[[1390096500,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","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:50 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:55:00 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.\n@@@\nChef::Exceptions::UnsupportedAction:
|
108
|
+
Something awry.\n@@@\n\n@@@\nfile.rb:2\nfile.rb:1\n@@@\n","date_happened":1390096500,"msg_title":"Chef
|
109
|
+
failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
110
|
+
failed in 2 seconds on chef.handler.datadog.test-failed ","text":"Chef updated
|
111
|
+
0 resources out of 0 resources total.\n@@@\nChef::Exceptions::UnsupportedAction:
|
112
|
+
Something awry.\n@@@\n\n@@@\nfile.rb:2\nfile.rb:1\n@@@\n","host":"chef.handler.datadog.test-failed","device":null}'
|
113
|
+
headers:
|
114
|
+
Accept:
|
115
|
+
- ! '*/*'
|
116
|
+
User-Agent:
|
117
|
+
- Ruby
|
118
|
+
Content-Type:
|
119
|
+
- application/json
|
120
|
+
response:
|
121
|
+
status:
|
122
|
+
code: 202
|
123
|
+
message: Accepted
|
124
|
+
headers:
|
125
|
+
Content-Type:
|
126
|
+
- text/json; charset=UTF-8
|
127
|
+
Date:
|
128
|
+
- Sun, 19 Jan 2014 01:54:51 GMT
|
129
|
+
Server:
|
130
|
+
- dogdispatcher/4.10.0
|
131
|
+
Content-Length:
|
132
|
+
- '474'
|
133
|
+
Connection:
|
134
|
+
- keep-alive
|
135
|
+
body:
|
136
|
+
encoding: US-ASCII
|
137
|
+
string: ! '{"status": "ok", "event": {"priority": "normal", "date_happened":
|
138
|
+
1390096500, "handle": null, "title": "Chef failed in 2 seconds on chef.handler.datadog.test-failed
|
139
|
+
", "url": "https://app.datadoghq.com/event/jump_to?event_id=2111137909406420235",
|
140
|
+
"text": "Chef updated 0 resources out of 0 resources total.\n@@@\nChef::Exceptions::UnsupportedAction:
|
141
|
+
Something awry.\n@@@\n\n@@@\nfile.rb:2\nfile.rb:1\n@@@\n", "tags": [], "related_event_id":
|
142
|
+
null, "id": 2111137909406420235}}'
|
143
|
+
http_version:
|
144
|
+
recorded_at: Sun, 19 Jan 2014 01:55:00 GMT
|
145
|
+
- request:
|
146
|
+
method: get
|
147
|
+
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
|
148
|
+
body:
|
149
|
+
encoding: US-ASCII
|
150
|
+
string: ''
|
151
|
+
headers:
|
152
|
+
Accept:
|
153
|
+
- ! '*/*'
|
154
|
+
User-Agent:
|
155
|
+
- Ruby
|
156
|
+
response:
|
157
|
+
status:
|
158
|
+
code: 200
|
159
|
+
message: OK
|
160
|
+
headers:
|
161
|
+
Cache-Control:
|
162
|
+
- no-cache
|
163
|
+
Content-Type:
|
164
|
+
- application/json
|
165
|
+
Date:
|
166
|
+
- Sun, 19 Jan 2014 01:54:51 GMT
|
167
|
+
Pragma:
|
168
|
+
- no-cache
|
169
|
+
Server:
|
170
|
+
- gunicorn/0.17.4
|
171
|
+
Content-Length:
|
172
|
+
- '44'
|
173
|
+
Connection:
|
174
|
+
- keep-alive
|
175
|
+
body:
|
176
|
+
encoding: US-ASCII
|
177
|
+
string: ! '{"tags": ["env:hostile", "role:highlander"]}'
|
178
|
+
http_version:
|
179
|
+
recorded_at: Sun, 19 Jan 2014 01:55:00 GMT
|
180
|
+
- request:
|
181
|
+
method: put
|
182
|
+
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
|
183
|
+
body:
|
184
|
+
encoding: UTF-8
|
185
|
+
string: ! '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
|
186
|
+
headers:
|
187
|
+
Accept:
|
188
|
+
- ! '*/*'
|
189
|
+
User-Agent:
|
190
|
+
- Ruby
|
191
|
+
Content-Type:
|
192
|
+
- application/json
|
193
|
+
response:
|
194
|
+
status:
|
195
|
+
code: 201
|
196
|
+
message: Created
|
197
|
+
headers:
|
198
|
+
Cache-Control:
|
199
|
+
- no-cache
|
200
|
+
Content-Type:
|
201
|
+
- application/json
|
202
|
+
Date:
|
203
|
+
- Sun, 19 Jan 2014 01:54:51 GMT
|
204
|
+
Pragma:
|
205
|
+
- no-cache
|
206
|
+
Server:
|
207
|
+
- gunicorn/0.17.4
|
208
|
+
Content-Length:
|
209
|
+
- '88'
|
210
|
+
Connection:
|
211
|
+
- keep-alive
|
212
|
+
body:
|
213
|
+
encoding: US-ASCII
|
214
|
+
string: ! '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile",
|
215
|
+
"role:highlander"]}'
|
216
|
+
http_version:
|
217
|
+
recorded_at: Sun, 19 Jan 2014 01:55:00 GMT
|
218
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,142 @@
|
|
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":[[1390109607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-noapp","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 05:33:13 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 05:33:27 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":[[1390109607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-noapp","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 05:33:14 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 05:33:27 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":[[1390109607,5.0]],"type":"gauge","host":"chef.handler.datadog.test-noapp","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 05:33:14 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 05:33:27 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":1390109607,"msg_title":"Chef
|
108
|
+
completed in 5 seconds on chef.handler.datadog.test-noapp ","priority":"low","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-noapp","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
109
|
+
completed in 5 seconds on chef.handler.datadog.test-noapp ","text":"Chef updated
|
110
|
+
0 resources out of 0 resources total.","host":"chef.handler.datadog.test-noapp","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 05:33:15 GMT
|
127
|
+
Server:
|
128
|
+
- dogdispatcher/4.10.0
|
129
|
+
Content-Length:
|
130
|
+
- '373'
|
131
|
+
Connection:
|
132
|
+
- keep-alive
|
133
|
+
body:
|
134
|
+
encoding: US-ASCII
|
135
|
+
string: ! '{"status": "ok", "event": {"priority": "low", "date_happened": 1390109607,
|
136
|
+
"handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-noapp
|
137
|
+
", "url": "https://app.datadoghq.com/event/jump_to?event_id=2111357760360136849",
|
138
|
+
"text": "Chef updated 0 resources out of 0 resources total.", "tags": [],
|
139
|
+
"related_event_id": null, "id": 2111357760360136849}}'
|
140
|
+
http_version:
|
141
|
+
recorded_at: Sun, 19 Jan 2014 05:33:27 GMT
|
142
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,215 @@
|
|
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":[[1390096495,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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:42 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:55 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":[[1390096495,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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:42 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:55 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":[[1390096495,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","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:43 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:55 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":1390096495,"msg_title":"Chef
|
108
|
+
completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
109
|
+
completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated
|
110
|
+
0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","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:43 GMT
|
127
|
+
Server:
|
128
|
+
- dogdispatcher/4.10.0
|
129
|
+
Content-Length:
|
130
|
+
- '372'
|
131
|
+
Connection:
|
132
|
+
- keep-alive
|
133
|
+
body:
|
134
|
+
encoding: US-ASCII
|
135
|
+
string: ! '{"status": "ok", "event": {"priority": "low", "date_happened": 1390096495,
|
136
|
+
"handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-tags
|
137
|
+
", "url": "https://app.datadoghq.com/event/jump_to?event_id=2111137779131465032",
|
138
|
+
"text": "Chef updated 0 resources out of 0 resources total.", "tags": [],
|
139
|
+
"related_event_id": null, "id": 2111137779131465032}}'
|
140
|
+
http_version:
|
141
|
+
recorded_at: Sun, 19 Jan 2014 01:54:55 GMT
|
142
|
+
- request:
|
143
|
+
method: get
|
144
|
+
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?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:43 GMT
|
164
|
+
Pragma:
|
165
|
+
- no-cache
|
166
|
+
Server:
|
167
|
+
- gunicorn/0.17.4
|
168
|
+
Content-Length:
|
169
|
+
- '44'
|
170
|
+
Connection:
|
171
|
+
- keep-alive
|
172
|
+
body:
|
173
|
+
encoding: US-ASCII
|
174
|
+
string: ! '{"tags": ["env:hostile", "role:highlander"]}'
|
175
|
+
http_version:
|
176
|
+
recorded_at: Sun, 19 Jan 2014 01:54:55 GMT
|
177
|
+
- request:
|
178
|
+
method: put
|
179
|
+
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=<API_KEY>&application_key=<APPLICATION_KEY>
|
180
|
+
body:
|
181
|
+
encoding: UTF-8
|
182
|
+
string: ! '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}'
|
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:43 GMT
|
201
|
+
Pragma:
|
202
|
+
- no-cache
|
203
|
+
Server:
|
204
|
+
- gunicorn/0.17.4
|
205
|
+
Content-Length:
|
206
|
+
- '86'
|
207
|
+
Connection:
|
208
|
+
- keep-alive
|
209
|
+
body:
|
210
|
+
encoding: US-ASCII
|
211
|
+
string: ! '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile",
|
212
|
+
"role:highlander"]}'
|
213
|
+
http_version:
|
214
|
+
recorded_at: Sun, 19 Jan 2014 01:54:55 GMT
|
215
|
+
recorded_with: VCR 2.8.0
|