chef-handler-librato 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,72 +1,85 @@
1
1
  chef-handler-librato
2
- Author - Brian Scott (b@bscott.me)
2
+
3
3
  ====================
4
4
 
5
- Chef Handler to send metrics to Librato metrics
5
+ Chef Handler to send metrics to Librato metrics!
6
6
 
7
- Description
7
+ ====Description====
8
8
 
9
9
  This is a simple Chef report handler that reports status of a Chef run through librato.
10
10
 
11
11
  http://wiki.opscode.com/display/chef/Exception+and+Report+Handlers
12
12
 
13
- Requirements
14
-
15
- Platform: All Platforms
13
+ Requirements:
16
14
 
17
15
 
18
16
  There are two ways to use Chef Handlers.
19
- Method 1
17
+
18
+ ##Method 1
20
19
 
21
20
  You can install the RubyGem ahead of time, and configure Chef to use them. To do so:
22
21
 
23
- gem install chef-handler-librato
22
+ gem install chef-handler-librato
24
23
 
25
24
  Then add to the configuration (/etc/chef/solo.rb for chef-solo or /etc/chef/client.rb for chef-client):
26
25
 
27
- require "chef-handler-librato"
26
+ require "chef-handler-librato"
27
+
28
+ ##### Configure the handler:
29
+
30
+ librato_handler = LibratoReporting.new
31
+
32
+ #### Arguments:
28
33
 
29
- # Configure the handler
30
- librato_handler = LibratoReporting.new
34
+ #### metric_type is a string that sets the Metrics type in Librato, defaults to counter
31
35
 
32
- # metric_type is a string that sets the Metrics type in Librato, defaults to counter
33
- librato_handler.metric_type = "counter"
36
+ librato_handler.metric_type = "gauge"
34
37
 
35
- # Email and Api_key
36
- librato_handler.email = "user@domain.com"
37
- librato_handler.api_key = "667hhff544300096423345"
38
+ #### Email and Api_key arguments
38
39
 
39
- # Add your handler
40
- report_handlers << librato_handler
41
- exception_handlers << librato_handler
40
+ librato_handler.email = "user@domain.com"
41
+ librato_handler.api_key = "667hhff544300096423345"
42
42
 
43
- Method 2
43
+
44
+
45
+ ### Add your handler:
46
+
47
+ report_handlers << librato_handler
48
+ exception_handlers << librato_handler
49
+
50
+ ##Method 2
44
51
 
45
52
  Use the chef_handler cookbook by Opscode. Create a recipe with the following:
46
53
 
47
- # Install the `chef-handler-librato` RubyGem during the compile phase
48
- gem_package "chef-handler-librato" do
49
- action :nothing
50
- end.run_action(:install)
54
+ ##### Install the `chef-handler-librato` RubyGem during the compile phase
51
55
 
56
+ gem_package "chef-handler-librato" do
57
+ action :nothing
58
+ end.run_action(:install)
59
+
52
60
  or
53
61
 
54
- chef_gem "chef-handler-librato" # This workd with Chef-0.10.10 or higher
62
+ chef_gem "chef-handler-librato" # This workd with Chef-0.10.10 or higher
63
+
64
+ ### Activate the handler with the `chef_handler` LWRP
55
65
 
56
- # Then activate the handler with the `chef_handler` LWRP
57
- argument_array = [
58
- :metric_type => "counter",
59
- :email => "user@domain.com",
60
- :api_key => "c544637891cf5498f9efac33257689rtt57777894"
61
- ]
66
+ argument_array = [
67
+ :metric_type => "counter" ,
68
+ :email => "user@domain.com",
69
+ :api_key => "c544637891cf5498f9efac33257689rtt57777894"
70
+ ]
71
+
62
72
 
63
- chef_handler "LibratoReporting" do
64
- source "#{File.join(Gem.all_load_paths.grep(/chef-handler-librato/).first,'chef', 'chef_handler_librato.rb')}"
65
- arguments argument_array
66
- action :nothing
67
- end.run_action(:enable)
73
+ chef_handler "LibratoReporting" do
74
+ source "#{File.join(Gem.all_load_paths.grep(/chef-handler-librato/).first,'chef',
75
+ 'chef_handler_librato.rb')}"
76
+ arguments argument_array
77
+ action :nothing
78
+ end.run_action(:enable)
68
79
 
69
80
 
70
81
  Patches welcome, just send me a pull request!
71
82
 
83
+ Author: Brian Scott (brainscott@gmail.com)
84
+
72
85
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "chef-handler-librato"
6
- s.version = "1.1.4"
6
+ s.version = "1.1.5"
7
7
  s.authors = ["Brian Scott"]
8
8
  s.email = ["brainscott@gmail.com"]
9
9
  s.homepage = ""
@@ -24,7 +24,7 @@ require "chef"
24
24
  require "chef/handler"
25
25
 
26
26
  class LibratoReporting < Chef::Handler
27
- attr_writer :metrics_type, :source, :email, :api_key
27
+ attr_writer :metric_type, :source, :email, :api_key
28
28
 
29
29
  def initialize(options = {})
30
30
  @metric_type = options[:metric_type] || "counter"
@@ -67,4 +67,4 @@ class LibratoReporting < Chef::Handler
67
67
  end
68
68
  end
69
69
  end
70
- end
70
+ end
metadata CHANGED
@@ -1,102 +1,99 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-librato
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 1
8
- - 4
9
- version: 1.1.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.5
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Brian Scott
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2012-06-30 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-05-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: librato-metrics
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
30
22
  type: :development
31
- version_requirements: *id001
32
- - !ruby/object:Gem::Dependency
33
- name: librato-metrics
34
23
  prerelease: false
35
- requirement: &id002 !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- segments:
40
- - 0
41
- version: "0"
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: librato-metrics
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
42
38
  type: :runtime
43
- version_requirements: *id002
44
- - !ruby/object:Gem::Dependency
45
- name: chef
46
39
  prerelease: false
47
- requirement: &id003 !ruby/object:Gem::Requirement
48
- requirements:
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- segments:
52
- - 0
53
- version: "0"
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: chef
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
54
  type: :runtime
55
- version_requirements: *id003
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
56
62
  description: Push reporting stats to Librato metrics
57
- email:
63
+ email:
58
64
  - brainscott@gmail.com
59
65
  executables: []
60
-
61
66
  extensions: []
62
-
63
67
  extra_rdoc_files: []
64
-
65
- files:
68
+ files:
66
69
  - .gitignore
67
70
  - README.md
68
71
  - Rakefile
69
72
  - chef-handler-librato.gemspec
70
73
  - lib/chef/chef_handler_librato.rb
71
- has_rdoc: true
72
- homepage: ""
74
+ homepage: ''
73
75
  licenses: []
74
-
75
76
  post_install_message:
76
77
  rdoc_options: []
77
-
78
- require_paths:
78
+ require_paths:
79
79
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- segments:
85
- - 0
86
- version: "0"
87
- required_rubygems_version: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- segments:
92
- - 0
93
- version: "0"
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
94
92
  requirements: []
95
-
96
93
  rubyforge_project:
97
- rubygems_version: 1.3.6
94
+ rubygems_version: 1.8.24
98
95
  signing_key:
99
96
  specification_version: 3
100
97
  summary: Push reporting stats to Librato metrics
101
98
  test_files: []
102
-
99
+ has_rdoc: