fluent-plugin-systemd 0.0.6 → 0.0.8
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 -2
- data/lib/fluent/plugin/in_systemd.rb +13 -4
- data/lib/fluent/plugin/systemd/pos_writer.rb +0 -1
- metadata +3 -11
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -67
- data/Rakefile +0 -31
- data/fluent-plugin-systemd.gemspec +0 -28
- data/pkg/fluent-plugin-systemd-0.0.3.gem +0 -0
- data/pkg/fluent-plugin-systemd-0.0.4.gem +0 -0
- data/pkg/fluent-plugin-systemd-0.0.5.gem +0 -0
- data/pkg/fluent-plugin-systemd-0.1.0.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c916a4987e289cd265209f8fe4ff5548dde671a
|
|
4
|
+
data.tar.gz: 2ba1b869f8cc9efa006c02559ea238a4404f65c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab17ffe10ba7f10b4decbc1723981c9f806cab8bf6a83a86cec461b7b628acebc68fa001acb597a5ee07f6b808cdd8bb705bf1f5cd25aec0070c2e2230cdd3ef
|
|
7
|
+
data.tar.gz: a37e74273f2c7b56755a4b4d4d78a8058ace1b9fe2b1115311a41cb2a6b05710f567d8883f1302c0451a7d138a760f1b1174bf5753fc7fd75278254f902c7ad7
|
data/README.md
CHANGED
|
@@ -26,11 +26,11 @@ if you are using fluentd v0.14 for the latest and greatest features
|
|
|
26
26
|
|
|
27
27
|
Simply use RubyGems:
|
|
28
28
|
|
|
29
|
-
gem install fluent-plugin-systemd -v 0.0.
|
|
29
|
+
gem install fluent-plugin-systemd -v 0.0.7
|
|
30
30
|
|
|
31
31
|
or
|
|
32
32
|
|
|
33
|
-
td-agent-gem install fluent-plugin-systemd -v 0.0.
|
|
33
|
+
td-agent-gem install fluent-plugin-systemd -v 0.0.7
|
|
34
34
|
|
|
35
35
|
## Configuration
|
|
36
36
|
|
|
@@ -16,9 +16,6 @@ module Fluent
|
|
|
16
16
|
def configure(conf)
|
|
17
17
|
super
|
|
18
18
|
@pos_writer = PosWriter.new(@pos_file)
|
|
19
|
-
@journal = Systemd::Journal.new(path: @path)
|
|
20
|
-
@journal.filter(*@filters)
|
|
21
|
-
seek
|
|
22
19
|
end
|
|
23
20
|
|
|
24
21
|
def start
|
|
@@ -37,6 +34,15 @@ module Fluent
|
|
|
37
34
|
|
|
38
35
|
private
|
|
39
36
|
|
|
37
|
+
def init_journal
|
|
38
|
+
@journal = Systemd::Journal.new(path: @path)
|
|
39
|
+
# make sure initial call to wait doesn't return :invalidate
|
|
40
|
+
# see https://github.com/ledbettj/systemd-journal/issues/70
|
|
41
|
+
@journal.wait(0)
|
|
42
|
+
@journal.filter(*@filters)
|
|
43
|
+
seek
|
|
44
|
+
end
|
|
45
|
+
|
|
40
46
|
def seek
|
|
41
47
|
seek_to(@pos_writer.cursor || read_from)
|
|
42
48
|
rescue Systemd::JournalError
|
|
@@ -59,6 +65,7 @@ module Fluent
|
|
|
59
65
|
end
|
|
60
66
|
|
|
61
67
|
def run
|
|
68
|
+
init_journal
|
|
62
69
|
Thread.current.abort_on_exception = true
|
|
63
70
|
watch do |entry|
|
|
64
71
|
begin
|
|
@@ -76,11 +83,13 @@ module Fluent
|
|
|
76
83
|
|
|
77
84
|
def watch
|
|
78
85
|
while @running
|
|
79
|
-
|
|
86
|
+
init_journal if @journal.wait(0) == :invalidate
|
|
80
87
|
while @journal.move_next && @running
|
|
81
88
|
yield @journal.current_entry
|
|
82
89
|
@pos_writer.update(@journal.cursor)
|
|
83
90
|
end
|
|
91
|
+
# prevent a loop of death
|
|
92
|
+
sleep 1
|
|
84
93
|
end
|
|
85
94
|
end
|
|
86
95
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-systemd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ed Robinson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-03-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -101,18 +101,10 @@ executables: []
|
|
|
101
101
|
extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
|
103
103
|
files:
|
|
104
|
-
- Gemfile
|
|
105
|
-
- Gemfile.lock
|
|
106
104
|
- LICENCE
|
|
107
105
|
- README.md
|
|
108
|
-
- Rakefile
|
|
109
|
-
- fluent-plugin-systemd.gemspec
|
|
110
106
|
- lib/fluent/plugin/in_systemd.rb
|
|
111
107
|
- lib/fluent/plugin/systemd/pos_writer.rb
|
|
112
|
-
- pkg/fluent-plugin-systemd-0.0.3.gem
|
|
113
|
-
- pkg/fluent-plugin-systemd-0.0.4.gem
|
|
114
|
-
- pkg/fluent-plugin-systemd-0.0.5.gem
|
|
115
|
-
- pkg/fluent-plugin-systemd-0.1.0.gem
|
|
116
108
|
homepage: https://github.com/reevoo/fluent-plugin-systemd
|
|
117
109
|
licenses:
|
|
118
110
|
- MIT
|
|
@@ -133,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
133
125
|
version: '0'
|
|
134
126
|
requirements: []
|
|
135
127
|
rubyforge_project:
|
|
136
|
-
rubygems_version: 2.
|
|
128
|
+
rubygems_version: 2.6.8
|
|
137
129
|
signing_key:
|
|
138
130
|
specification_version: 4
|
|
139
131
|
summary: Input plugin to read from systemd journal.
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
fluent-plugin-systemd (0.0.6)
|
|
5
|
-
fluentd (~> 0.12)
|
|
6
|
-
systemd-journal (~> 1.2)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
ast (2.3.0)
|
|
12
|
-
astrolabe (1.3.1)
|
|
13
|
-
parser (~> 2.2)
|
|
14
|
-
cool.io (1.4.5)
|
|
15
|
-
ffi (1.9.17)
|
|
16
|
-
fluentd (0.12.31)
|
|
17
|
-
cool.io (>= 1.2.2, < 2.0.0)
|
|
18
|
-
http_parser.rb (>= 0.5.1, < 0.7.0)
|
|
19
|
-
json (>= 1.4.3)
|
|
20
|
-
msgpack (>= 0.5.11, < 0.6.0)
|
|
21
|
-
sigdump (~> 0.2.2)
|
|
22
|
-
string-scrub (>= 0.0.3, <= 0.0.5)
|
|
23
|
-
tzinfo (>= 1.0.0)
|
|
24
|
-
tzinfo-data (>= 1.0.0)
|
|
25
|
-
yajl-ruby (~> 1.0)
|
|
26
|
-
http_parser.rb (0.6.0)
|
|
27
|
-
json (2.0.3)
|
|
28
|
-
msgpack (0.5.12)
|
|
29
|
-
parser (2.3.3.1)
|
|
30
|
-
ast (~> 2.2)
|
|
31
|
-
powerpack (0.0.9)
|
|
32
|
-
rainbow (2.2.1)
|
|
33
|
-
rake (12.0.0)
|
|
34
|
-
reevoocop (0.0.9)
|
|
35
|
-
rubocop (= 0.28.0)
|
|
36
|
-
rubocop (0.28.0)
|
|
37
|
-
astrolabe (~> 1.3)
|
|
38
|
-
parser (>= 2.2.0.pre.7, < 3.0)
|
|
39
|
-
powerpack (~> 0.0.6)
|
|
40
|
-
rainbow (>= 1.99.1, < 3.0)
|
|
41
|
-
ruby-progressbar (~> 1.4)
|
|
42
|
-
ruby-progressbar (1.8.1)
|
|
43
|
-
sigdump (0.2.4)
|
|
44
|
-
string-scrub (0.0.5)
|
|
45
|
-
systemd-journal (1.2.3)
|
|
46
|
-
ffi (~> 1.9)
|
|
47
|
-
test-unit (2.5.5)
|
|
48
|
-
thread_safe (0.3.5)
|
|
49
|
-
tzinfo (1.2.2)
|
|
50
|
-
thread_safe (~> 0.1)
|
|
51
|
-
tzinfo-data (1.2016.10)
|
|
52
|
-
tzinfo (>= 1.0.0)
|
|
53
|
-
yajl-ruby (1.3.0)
|
|
54
|
-
|
|
55
|
-
PLATFORMS
|
|
56
|
-
ruby
|
|
57
|
-
|
|
58
|
-
DEPENDENCIES
|
|
59
|
-
bundler (~> 1.10)
|
|
60
|
-
fluent-plugin-systemd!
|
|
61
|
-
fluentd (= 0.12.31)
|
|
62
|
-
rake
|
|
63
|
-
reevoocop
|
|
64
|
-
test-unit (~> 2.5)
|
|
65
|
-
|
|
66
|
-
BUNDLED WITH
|
|
67
|
-
1.13.2
|
data/Rakefile
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|
|
2
|
-
require "rake/testtask"
|
|
3
|
-
require "reevoocop/rake_task"
|
|
4
|
-
require "fileutils"
|
|
5
|
-
|
|
6
|
-
ReevooCop::RakeTask.new(:reevoocop)
|
|
7
|
-
|
|
8
|
-
Rake::TestTask.new(:test) do |t|
|
|
9
|
-
t.test_files = Dir["test/**/test_*.rb"]
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
task default: "docker:test"
|
|
13
|
-
task build: "docker:test"
|
|
14
|
-
task default: :reevoocop
|
|
15
|
-
|
|
16
|
-
namespace :docker do
|
|
17
|
-
distros = [:ubuntu, :"tdagent-ubuntu", :"tdagent-centos"]
|
|
18
|
-
task test: distros
|
|
19
|
-
|
|
20
|
-
distros.each do |distro|
|
|
21
|
-
task distro do
|
|
22
|
-
puts "testing on #{distro}"
|
|
23
|
-
begin
|
|
24
|
-
FileUtils.cp("test/docker/Dockerfile.#{distro}", "Dockerfile")
|
|
25
|
-
sh "docker build ."
|
|
26
|
-
ensure
|
|
27
|
-
FileUtils.rm("Dockerfile")
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
lib = File.expand_path("../lib", __FILE__)
|
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name = "fluent-plugin-systemd"
|
|
8
|
-
spec.version = "0.0.6"
|
|
9
|
-
spec.authors = ["Ed Robinson"]
|
|
10
|
-
spec.email = ["ed@reevoo.com"]
|
|
11
|
-
|
|
12
|
-
spec.summary = "Input plugin to read from systemd journal."
|
|
13
|
-
spec.description = "This is a fluentd input plugin. It reads logs from the systemd journal."
|
|
14
|
-
spec.homepage = "https://github.com/reevoo/fluent-plugin-systemd"
|
|
15
|
-
spec.license = "MIT"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
spec.files = Dir["**/**"].reject { |f| f.match(/^(test|spec|features)\//) }
|
|
19
|
-
spec.require_paths = ["lib"]
|
|
20
|
-
|
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.10"
|
|
22
|
-
spec.add_development_dependency "rake"
|
|
23
|
-
spec.add_development_dependency "test-unit", "~> 2.5"
|
|
24
|
-
spec.add_development_dependency "reevoocop"
|
|
25
|
-
|
|
26
|
-
spec.add_runtime_dependency "fluentd", "~> 0.12"
|
|
27
|
-
spec.add_runtime_dependency "systemd-journal", "~> 1.2"
|
|
28
|
-
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|