fluent-plugin-munin-node 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/fluent/plugin/in_munin_node.rb +22 -12
- data/lib/fluent_plugin_munin_node/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40715938a20832b9b2cd85e39c40ced5ea5f74ce
|
|
4
|
+
data.tar.gz: 3f532fb1d6dd01309a2bc11d09a4035eb6ae3f12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97d5f677b50cac77e091e30d3a101e80ba5a94f0c9d5da4707742b85c58851cb613ce99381ead9040121d75d137a5c426518533219c138754f1ab5b6767bc8af
|
|
7
|
+
data.tar.gz: aa23d05edd9be3de41846c9ab9d513bdef97150def68245de629356efa9466763b8b5f4924871129f1931e3c0415b59d882ab5072012cff36e21acc6ef0f0154
|
data/README.md
CHANGED
|
@@ -11,18 +11,20 @@ class Fluent::MuninNodeInput < Fluent::Input
|
|
|
11
11
|
define_method('router') { Fluent::Engine }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
config_param :node_host,
|
|
15
|
-
config_param :node_port,
|
|
16
|
-
config_param :interval,
|
|
17
|
-
config_param :tag_prefix,
|
|
18
|
-
config_param :bulk_suffix,
|
|
19
|
-
config_param :service_key,
|
|
20
|
-
config_param :field_key,
|
|
21
|
-
config_param :value_key,
|
|
22
|
-
config_param :extra,
|
|
23
|
-
config_param :bulk,
|
|
24
|
-
config_param :include_service,
|
|
25
|
-
config_param :exclude_service,
|
|
14
|
+
config_param :node_host, :string, :default => '127.0.0.1'
|
|
15
|
+
config_param :node_port, :integer, :default => 4949
|
|
16
|
+
config_param :interval, :time, :default => 60
|
|
17
|
+
config_param :tag_prefix, :string, :default => 'munin'
|
|
18
|
+
config_param :bulk_suffix, :string, :default => 'metrics'
|
|
19
|
+
config_param :service_key, :string, :default => 'service'
|
|
20
|
+
config_param :field_key, :string, :default => 'field'
|
|
21
|
+
config_param :value_key, :string, :default => 'value'
|
|
22
|
+
config_param :extra, :hash, :default => {}
|
|
23
|
+
config_param :bulk, :bool, :default => false
|
|
24
|
+
config_param :include_service, :string, :default => nil
|
|
25
|
+
config_param :exclude_service, :string, :default => nil
|
|
26
|
+
config_param :include_hostname, :bool, :default => false
|
|
27
|
+
config_param :hostname_key, :string, :default => 'hostname'
|
|
26
28
|
|
|
27
29
|
def initialize
|
|
28
30
|
super
|
|
@@ -34,6 +36,10 @@ class Fluent::MuninNodeInput < Fluent::Input
|
|
|
34
36
|
|
|
35
37
|
@include_service = Regexp.new(@include_service) if @include_service
|
|
36
38
|
@exclude_service = Regexp.new(@exclude_service) if @exclude_service
|
|
39
|
+
|
|
40
|
+
if @include_hostname
|
|
41
|
+
@extra.update(@hostname_key => hostname)
|
|
42
|
+
end
|
|
37
43
|
end
|
|
38
44
|
|
|
39
45
|
def start
|
|
@@ -121,6 +127,10 @@ class Fluent::MuninNodeInput < Fluent::Input
|
|
|
121
127
|
services
|
|
122
128
|
end
|
|
123
129
|
|
|
130
|
+
def hostname
|
|
131
|
+
`hostname`.strip
|
|
132
|
+
end
|
|
133
|
+
|
|
124
134
|
class TimerWatcher < Coolio::TimerWatcher
|
|
125
135
|
def initialize(interval, repeat, log, &callback)
|
|
126
136
|
@callback = callback
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-munin-node
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genki Sugawara
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-09-
|
|
11
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fluentd
|