riemann-munin 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +10 -0
  4. data/bin/riemann-munin +36 -0
  5. metadata +74 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 78d79fd0c78c85343376c5763bfc25e10493f5af
4
+ data.tar.gz: 7d997fdd6d3117d29b19339342e8b72bf1e718c4
5
+ SHA512:
6
+ metadata.gz: c18bfd0ac678b6f76ca8938c37684ea9bc1bed9c1bc233317afb5d665e8cb04d0b16e53c01e292a5264b34359bc51928067b6360360bd5345328c10d27002e28
7
+ data.tar.gz: 9f3ccc671342fb109c7e8c13425d607cac4b1c6992661fa502f1dac160652f131f04ba61a5fe0a4269a3884444425bb877ea499ee67ac2f952291dbfc72a5ed4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2011 Kyle Kingsbury
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # Riemann Munin
2
+
3
+ Gathers munin statistics and submits them to Riemann.
4
+
5
+ # Getting started
6
+
7
+ ```
8
+ gem install riemann-munin
9
+ riemann-munin --help
10
+ ```
data/bin/riemann-munin ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Gathers munin statistics and submits them to Riemann.
4
+
5
+ require 'riemann/tools'
6
+
7
+ class Riemann::Tools::Munin
8
+ include Riemann::Tools
9
+ require 'munin-ruby'
10
+
11
+ def initialize
12
+ @munin = ::Munin::Node.new
13
+ end
14
+
15
+ def tick
16
+ services = opts[:services] || @munin.list
17
+ services.each do |service|
18
+ @munin.fetch(service).each do |service, parts|
19
+ parts.each do |part, metric|
20
+ report(
21
+ :service => "#{service} #{part}",
22
+ :metric => metric.to_f,
23
+ :state => 'ok',
24
+ :tags => ['munin']
25
+ )
26
+ end
27
+ end
28
+ end
29
+ end
30
+
31
+ opt :munin_host, "Munin hostname", :default => 'localhost'
32
+ opt :munin_port, "Munin port", :default => 4949
33
+ opt :services, "Munin services to translate (if not specified, all services are relayed)", :type => :strings
34
+ end
35
+
36
+ Riemann::Tools::Munin.run
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: riemann-munin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kyle Kingsbury
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: riemann-tools
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.2.7
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.2.7
27
+ - !ruby/object:Gem::Dependency
28
+ name: munin-ruby
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.1
41
+ description:
42
+ email: aphyr@aphyr.com
43
+ executables:
44
+ - riemann-munin
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - LICENSE
49
+ - README.md
50
+ - bin/riemann-munin
51
+ homepage: https://github.com/riemann/riemann-munin
52
+ licenses: []
53
+ metadata: {}
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.8.7
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project: riemann-munin
70
+ rubygems_version: 2.4.5
71
+ signing_key:
72
+ specification_version: 4
73
+ summary: Submits munin stats to riemann.
74
+ test_files: []