chef-handler-datadog 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +7 -0
- data/Appraisals +2 -0
- data/CHANGELOG.md +5 -0
- data/gemfiles/chef_11.16.0.gemfile +16 -0
- data/gemfiles/chef_12.0.0.alpha.1.gemfile +16 -0
- data/lib/chef/handler/datadog.rb +8 -4
- data/lib/chef_handler_datadog.rb +1 -1
- data/spec/datadog_spec.rb +1 -0
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +43 -41
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +23 -22
- data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +20 -19
- data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +19 -18
- data/spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml +22 -21
- data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +20 -20
- data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +21 -21
- 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 +20 -20
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +20 -20
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +20 -20
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +20 -20
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +23 -23
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +21 -21
- data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml +22 -22
- data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/does_not_emit_metrics.yml +12 -11
- data/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml +13 -12
- data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +20 -20
- metadata +4 -2
@@ -6,10 +6,10 @@ http_interactions:
|
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: ! '{"msg_text":"Chef was unable to complete a run, an error during compilation
|
9
|
-
may have
|
10
|
-
compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
9
|
+
may have occurred.","date_happened":1410264902,"msg_title":"Chef failed during
|
10
|
+
compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
11
11
|
failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef
|
12
|
-
was unable to complete a run, an error during compilation may have
|
12
|
+
was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}'
|
13
13
|
headers:
|
14
14
|
Accept:
|
15
15
|
- ! '*/*'
|
@@ -25,22 +25,23 @@ http_interactions:
|
|
25
25
|
Content-Type:
|
26
26
|
- text/json; charset=UTF-8
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Tue, 09 Sep 2014 12:15:02 GMT
|
29
29
|
Server:
|
30
30
|
- dogdispatcher/5.1.1
|
31
31
|
Content-Length:
|
32
|
-
- '
|
32
|
+
- '431'
|
33
33
|
Connection:
|
34
34
|
- keep-alive
|
35
35
|
body:
|
36
36
|
encoding: US-ASCII
|
37
37
|
string: ! '{"status": "ok", "event": {"priority": "normal", "date_happened":
|
38
|
-
|
39
|
-
chef.handler.datadog.test-resources ", "url": "https://app.datadoghq.com/event/jump_to?event_id=
|
38
|
+
1410264902, "handle": null, "title": "Chef failed during compile phase on
|
39
|
+
chef.handler.datadog.test-resources ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507704361410798",
|
40
40
|
"text": "Chef was unable to complete a run, an error during compilation may
|
41
|
-
have
|
41
|
+
have occurred.", "tags": ["env:resources"], "related_event_id": null, "id":
|
42
|
+
2449507704361410798}}'
|
42
43
|
http_version:
|
43
|
-
recorded_at:
|
44
|
+
recorded_at: Tue, 09 Sep 2014 12:15:02 GMT
|
44
45
|
- request:
|
45
46
|
method: put
|
46
47
|
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
|
@@ -64,7 +65,7 @@ http_interactions:
|
|
64
65
|
Content-Type:
|
65
66
|
- application/json
|
66
67
|
Date:
|
67
|
-
-
|
68
|
+
- Tue, 09 Sep 2014 12:15:03 GMT
|
68
69
|
Pragma:
|
69
70
|
- no-cache
|
70
71
|
Server:
|
@@ -77,5 +78,5 @@ http_interactions:
|
|
77
78
|
encoding: US-ASCII
|
78
79
|
string: ! '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}'
|
79
80
|
http_version:
|
80
|
-
recorded_at:
|
81
|
+
recorded_at: Tue, 09 Sep 2014 12:15:03 GMT
|
81
82
|
recorded_with: VCR 2.9.2
|
@@ -6,10 +6,10 @@ http_interactions:
|
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: ! '{"msg_text":"Chef was unable to complete a run, an error during compilation
|
9
|
-
may have
|
10
|
-
compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
9
|
+
may have occurred.","date_happened":1410264903,"msg_title":"Chef failed during
|
10
|
+
compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
11
11
|
failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef
|
12
|
-
was unable to complete a run, an error during compilation may have
|
12
|
+
was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}'
|
13
13
|
headers:
|
14
14
|
Accept:
|
15
15
|
- ! '*/*'
|
@@ -25,22 +25,23 @@ http_interactions:
|
|
25
25
|
Content-Type:
|
26
26
|
- text/json; charset=UTF-8
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Tue, 09 Sep 2014 12:15:03 GMT
|
29
29
|
Server:
|
30
|
-
- dogdispatcher/5.
|
30
|
+
- dogdispatcher/5.2.0
|
31
31
|
Content-Length:
|
32
|
-
- '
|
32
|
+
- '431'
|
33
33
|
Connection:
|
34
34
|
- keep-alive
|
35
35
|
body:
|
36
36
|
encoding: US-ASCII
|
37
37
|
string: ! '{"status": "ok", "event": {"priority": "normal", "date_happened":
|
38
|
-
|
39
|
-
chef.handler.datadog.test-resources ", "url": "https://app.datadoghq.com/event/jump_to?event_id=
|
38
|
+
1410264903, "handle": null, "title": "Chef failed during compile phase on
|
39
|
+
chef.handler.datadog.test-resources ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507720114974929",
|
40
40
|
"text": "Chef was unable to complete a run, an error during compilation may
|
41
|
-
have
|
41
|
+
have occurred.", "tags": ["env:resources"], "related_event_id": null, "id":
|
42
|
+
2449507720114974929}}'
|
42
43
|
http_version:
|
43
|
-
recorded_at:
|
44
|
+
recorded_at: Tue, 09 Sep 2014 12:15:03 GMT
|
44
45
|
- request:
|
45
46
|
method: put
|
46
47
|
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
|
@@ -64,7 +65,7 @@ http_interactions:
|
|
64
65
|
Content-Type:
|
65
66
|
- application/json
|
66
67
|
Date:
|
67
|
-
-
|
68
|
+
- Tue, 09 Sep 2014 12:15:03 GMT
|
68
69
|
Pragma:
|
69
70
|
- no-cache
|
70
71
|
Server:
|
@@ -77,5 +78,5 @@ http_interactions:
|
|
77
78
|
encoding: US-ASCII
|
78
79
|
string: ! '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}'
|
79
80
|
http_version:
|
80
|
-
recorded_at:
|
81
|
+
recorded_at: Tue, 09 Sep 2014 12:15:03 GMT
|
81
82
|
recorded_with: VCR 2.9.2
|
@@ -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.resources.total","points":[[
|
8
|
+
string: ! '{"series":[{"metric":"chef.resources.total","points":[[1410264893,2.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}'
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- ! '*/*'
|
@@ -21,7 +21,7 @@ http_interactions:
|
|
21
21
|
Content-Type:
|
22
22
|
- text/json; charset=UTF-8
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Tue, 09 Sep 2014 12:14:46 GMT
|
25
25
|
Server:
|
26
26
|
- dogdispatcher/5.1.1
|
27
27
|
Content-Length:
|
@@ -32,13 +32,13 @@ http_interactions:
|
|
32
32
|
encoding: US-ASCII
|
33
33
|
string: ! '{"status":"ok"}'
|
34
34
|
http_version:
|
35
|
-
recorded_at:
|
35
|
+
recorded_at: Tue, 09 Sep 2014 12:14:53 GMT
|
36
36
|
- request:
|
37
37
|
method: post
|
38
38
|
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: ! '{"series":[{"metric":"chef.resources.updated","points":[[
|
41
|
+
string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1410264893,1.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}'
|
42
42
|
headers:
|
43
43
|
Accept:
|
44
44
|
- ! '*/*'
|
@@ -54,7 +54,7 @@ http_interactions:
|
|
54
54
|
Content-Type:
|
55
55
|
- text/json; charset=UTF-8
|
56
56
|
Date:
|
57
|
-
-
|
57
|
+
- Tue, 09 Sep 2014 12:14:46 GMT
|
58
58
|
Server:
|
59
59
|
- dogdispatcher/5.1.1
|
60
60
|
Content-Length:
|
@@ -65,13 +65,13 @@ http_interactions:
|
|
65
65
|
encoding: US-ASCII
|
66
66
|
string: ! '{"status":"ok"}'
|
67
67
|
http_version:
|
68
|
-
recorded_at:
|
68
|
+
recorded_at: Tue, 09 Sep 2014 12:14:53 GMT
|
69
69
|
- request:
|
70
70
|
method: post
|
71
71
|
uri: https://app.datadoghq.com/api/v1/series?api_key=<API_KEY>
|
72
72
|
body:
|
73
73
|
encoding: UTF-8
|
74
|
-
string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[
|
74
|
+
string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1410264893,8.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}'
|
75
75
|
headers:
|
76
76
|
Accept:
|
77
77
|
- ! '*/*'
|
@@ -87,7 +87,7 @@ http_interactions:
|
|
87
87
|
Content-Type:
|
88
88
|
- text/json; charset=UTF-8
|
89
89
|
Date:
|
90
|
-
-
|
90
|
+
- Tue, 09 Sep 2014 12:14:47 GMT
|
91
91
|
Server:
|
92
92
|
- dogdispatcher/5.1.1
|
93
93
|
Content-Length:
|
@@ -98,15 +98,15 @@ http_interactions:
|
|
98
98
|
encoding: US-ASCII
|
99
99
|
string: ! '{"status":"ok"}'
|
100
100
|
http_version:
|
101
|
-
recorded_at:
|
101
|
+
recorded_at: Tue, 09 Sep 2014 12:14:53 GMT
|
102
102
|
- request:
|
103
103
|
method: post
|
104
104
|
uri: https://app.datadoghq.com/api/v1/events?api_key=<API_KEY>
|
105
105
|
body:
|
106
106
|
encoding: UTF-8
|
107
107
|
string: ! '{"msg_text":"Chef updated 1 resources out of 2 resources total.\n$$$\n-
|
108
|
-
[whiskers] (dynamically defined)\n\n$$$\n","date_happened":
|
109
|
-
completed in 8 seconds on chef.handler.datadog.test-resources ","priority":"low","parent":null,"tags":[],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
108
|
+
[whiskers] (dynamically defined)\n\n$$$\n","date_happened":1410264893,"msg_title":"Chef
|
109
|
+
completed in 8 seconds on chef.handler.datadog.test-resources ","priority":"low","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef
|
110
110
|
completed in 8 seconds on chef.handler.datadog.test-resources ","text":"Chef
|
111
111
|
updated 1 resources out of 2 resources total.\n$$$\n- [whiskers] (dynamically
|
112
112
|
defined)\n\n$$$\n","host":"chef.handler.datadog.test-resources","device":null}'
|
@@ -125,23 +125,23 @@ http_interactions:
|
|
125
125
|
Content-Type:
|
126
126
|
- text/json; charset=UTF-8
|
127
127
|
Date:
|
128
|
-
-
|
128
|
+
- Tue, 09 Sep 2014 12:14:47 GMT
|
129
129
|
Server:
|
130
130
|
- dogdispatcher/5.1.1
|
131
131
|
Content-Length:
|
132
|
-
- '
|
132
|
+
- '442'
|
133
133
|
Connection:
|
134
134
|
- keep-alive
|
135
135
|
body:
|
136
136
|
encoding: US-ASCII
|
137
|
-
string: ! '{"status": "ok", "event": {"priority": "low", "date_happened":
|
137
|
+
string: ! '{"status": "ok", "event": {"priority": "low", "date_happened": 1410264893,
|
138
138
|
"handle": null, "title": "Chef completed in 8 seconds on chef.handler.datadog.test-resources
|
139
|
-
", "url": "https://app.datadoghq.com/event/jump_to?event_id=
|
139
|
+
", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507457417842743",
|
140
140
|
"text": "Chef updated 1 resources out of 2 resources total.\n$$$\n- [whiskers]
|
141
|
-
(dynamically defined)\n\n$$$\n", "tags": [], "related_event_id":
|
142
|
-
|
141
|
+
(dynamically defined)\n\n$$$\n", "tags": ["env:resources"], "related_event_id":
|
142
|
+
null, "id": 2449507457417842743}}'
|
143
143
|
http_version:
|
144
|
-
recorded_at:
|
144
|
+
recorded_at: Tue, 09 Sep 2014 12:14:53 GMT
|
145
145
|
- request:
|
146
146
|
method: put
|
147
147
|
uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=<API_KEY>&application_key=<APPLICATION_KEY>&source=chef
|
@@ -165,7 +165,7 @@ http_interactions:
|
|
165
165
|
Content-Type:
|
166
166
|
- application/json
|
167
167
|
Date:
|
168
|
-
-
|
168
|
+
- Tue, 09 Sep 2014 12:14:48 GMT
|
169
169
|
Pragma:
|
170
170
|
- no-cache
|
171
171
|
Server:
|
@@ -178,5 +178,5 @@ http_interactions:
|
|
178
178
|
encoding: US-ASCII
|
179
179
|
string: ! '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}'
|
180
180
|
http_version:
|
181
|
-
recorded_at:
|
181
|
+
recorded_at: Tue, 09 Sep 2014 12:14:53 GMT
|
182
182
|
recorded_with: VCR 2.9.2
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-handler-datadog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Fiedler
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: dogapi
|
@@ -200,7 +200,9 @@ files:
|
|
200
200
|
- gemfiles/chef_11.10.4.gemfile
|
201
201
|
- gemfiles/chef_11.12.8.gemfile
|
202
202
|
- gemfiles/chef_11.14.2.gemfile
|
203
|
+
- gemfiles/chef_11.16.0.gemfile
|
203
204
|
- gemfiles/chef_11.8.2.gemfile
|
205
|
+
- gemfiles/chef_12.0.0.alpha.1.gemfile
|
204
206
|
- lib/chef/handler/datadog.rb
|
205
207
|
- lib/chef_handler_datadog.rb
|
206
208
|
- spec/datadog_spec.rb
|