chef-handler-datadog 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/chef-handler-datadog.rb +8 -2
- metadata +13 -28
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.11
|
data/lib/chef-handler-datadog.rb
CHANGED
@@ -63,13 +63,19 @@ class Datadog < Chef::Handler
|
|
63
63
|
), :host => run_status.node.name)
|
64
64
|
|
65
65
|
# Get the current list of tags, remove any "role:" entries
|
66
|
-
host_tags = @dog.host_tags(node.name)[1]["tags"]
|
67
|
-
host_tags.delete_if {|tag| tag.start_with?('role:') }
|
66
|
+
host_tags = @dog.host_tags(node.name)[1]["tags"] || []
|
67
|
+
host_tags.delete_if {|tag| tag.start_with?('role:') }
|
68
68
|
|
69
69
|
# Get list of chef roles, rename them to tag format
|
70
70
|
chef_roles = node.run_list.roles
|
71
71
|
chef_roles.collect! {|role| "role:" + role }
|
72
72
|
|
73
|
+
# Get the chef environment (as long as it's not '_default')
|
74
|
+
if node.respond_to?('chef_environment') && node.chef_environment != '_default'
|
75
|
+
host_tags.delete_if {|tag| tag.start_with?('env:') }
|
76
|
+
host_tags << "env:" + node.chef_environment
|
77
|
+
end
|
78
|
+
|
73
79
|
# Combine (union) both arrays. Removes dupes, preserves non-chef tags.
|
74
80
|
new_host_tags = host_tags | chef_roles
|
75
81
|
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-handler-datadog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
8
|
+
- 11
|
9
|
+
version: 0.0.11
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Mike Fiedler
|
@@ -16,99 +15,88 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2012-
|
18
|
+
date: 2012-04-05 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
-
none: false
|
24
23
|
requirements:
|
25
24
|
- - ">="
|
26
25
|
- !ruby/object:Gem::Version
|
27
|
-
hash: 31
|
28
26
|
segments:
|
29
27
|
- 0
|
30
28
|
- 9
|
31
29
|
- 18
|
32
30
|
version: 0.9.18
|
31
|
+
requirement: *id001
|
33
32
|
name: chef
|
34
33
|
prerelease: false
|
35
34
|
type: :runtime
|
36
|
-
requirement: *id001
|
37
35
|
- !ruby/object:Gem::Dependency
|
38
36
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
37
|
requirements:
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
hash: 11
|
44
40
|
segments:
|
45
41
|
- 1
|
46
42
|
- 2
|
47
43
|
version: "1.2"
|
44
|
+
requirement: *id002
|
48
45
|
name: dogapi
|
49
46
|
prerelease: false
|
50
47
|
type: :runtime
|
51
|
-
requirement: *id002
|
52
48
|
- !ruby/object:Gem::Dependency
|
53
49
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
50
|
requirements:
|
56
51
|
- - ">="
|
57
52
|
- !ruby/object:Gem::Version
|
58
|
-
hash: 3
|
59
53
|
segments:
|
60
54
|
- 0
|
61
55
|
version: "0"
|
56
|
+
requirement: *id003
|
62
57
|
name: shoulda
|
63
58
|
prerelease: false
|
64
59
|
type: :development
|
65
|
-
requirement: *id003
|
66
60
|
- !ruby/object:Gem::Dependency
|
67
61
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
62
|
requirements:
|
70
63
|
- - ">="
|
71
64
|
- !ruby/object:Gem::Version
|
72
|
-
hash: 23
|
73
65
|
segments:
|
74
66
|
- 1
|
75
67
|
- 0
|
76
68
|
- 0
|
77
69
|
version: 1.0.0
|
70
|
+
requirement: *id004
|
78
71
|
name: bundler
|
79
72
|
prerelease: false
|
80
73
|
type: :development
|
81
|
-
requirement: *id004
|
82
74
|
- !ruby/object:Gem::Dependency
|
83
75
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
76
|
requirements:
|
86
77
|
- - ~>
|
87
78
|
- !ruby/object:Gem::Version
|
88
|
-
hash: 7
|
89
79
|
segments:
|
90
80
|
- 1
|
91
81
|
- 6
|
92
82
|
- 4
|
93
83
|
version: 1.6.4
|
84
|
+
requirement: *id005
|
94
85
|
name: jeweler
|
95
86
|
prerelease: false
|
96
87
|
type: :development
|
97
|
-
requirement: *id005
|
98
88
|
- !ruby/object:Gem::Dependency
|
99
89
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
90
|
requirements:
|
102
91
|
- - ">="
|
103
92
|
- !ruby/object:Gem::Version
|
104
|
-
hash: 3
|
105
93
|
segments:
|
106
94
|
- 0
|
107
95
|
version: "0"
|
96
|
+
requirement: *id006
|
108
97
|
name: rdoc
|
109
98
|
prerelease: false
|
110
99
|
type: :development
|
111
|
-
requirement: *id006
|
112
100
|
description: This Handler will report the events and metrics for a chef-client run to DataDog.
|
113
101
|
email: packages@datadoghq.com
|
114
102
|
executables: []
|
@@ -128,6 +116,7 @@ files:
|
|
128
116
|
- lib/chef-handler-datadog.rb
|
129
117
|
- test/helper.rb
|
130
118
|
- test/test_chef-handler-datadog.rb
|
119
|
+
has_rdoc: true
|
131
120
|
homepage: http://www.datadoghq.com/
|
132
121
|
licenses:
|
133
122
|
- BSD
|
@@ -137,27 +126,23 @@ rdoc_options: []
|
|
137
126
|
require_paths:
|
138
127
|
- lib
|
139
128
|
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
-
none: false
|
141
129
|
requirements:
|
142
130
|
- - ">="
|
143
131
|
- !ruby/object:Gem::Version
|
144
|
-
hash: 3
|
145
132
|
segments:
|
146
133
|
- 0
|
147
134
|
version: "0"
|
148
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
-
none: false
|
150
136
|
requirements:
|
151
137
|
- - ">="
|
152
138
|
- !ruby/object:Gem::Version
|
153
|
-
hash: 3
|
154
139
|
segments:
|
155
140
|
- 0
|
156
141
|
version: "0"
|
157
142
|
requirements: []
|
158
143
|
|
159
144
|
rubyforge_project:
|
160
|
-
rubygems_version: 1.
|
145
|
+
rubygems_version: 1.3.6
|
161
146
|
signing_key:
|
162
147
|
specification_version: 3
|
163
148
|
summary: Chef Handler for DataDog events and metrics
|