fluent-plugin-systemd 0.1.1.pre3 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a98a79b5d7bfa6dde174c9c0d8352407b07d37d
4
- data.tar.gz: f6ddce5e5522d96460b4794fe1646bcc6f7837a2
3
+ metadata.gz: 3d1e4a2ade25b42fdf5d04e16ce877c6c380953f
4
+ data.tar.gz: 1dacc441622a3dfae2985a6be2f41f26efcc7341
5
5
  SHA512:
6
- metadata.gz: 378a0319305a350c770213d8090550bd808f664bef08766bb2bc0c03bcb69e3aad0244d5246f99feba606ae0159dcb32f579f43a673d5dc435cdcf77f199462f
7
- data.tar.gz: 296c1f33d19d5c4adcd68354330bb1f8ca9c13e0d16b128c1828a8d252f2aea3b2f1300689a83d607212a527d0681579f5ba052e0b43b63aa010e844bfdaa125
6
+ metadata.gz: 186f98b177cde9d3537bb4e0b06e337cc94c149e679aa044b173accb56ea76b0125fd6bbc154894ca01bfb75b7f34b579e98d7cb49a2f3fc7ea70a379e6503da
7
+ data.tar.gz: a7e29f074c8c01afd459cb33c4f048b63317fcfc2cba4d5146c684a4cd9b36363363ea7b3585d12654f6e85efab1a97f746ace81abf91baa8a2210ce52ca3a28
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-systemd (0.1.1.pre3)
4
+ fluent-plugin-systemd (0.1.1)
5
5
  fluentd (>= 0.14.11, < 2)
6
6
  systemd-journal (~> 1.2)
7
7
 
data/README.md CHANGED
@@ -5,13 +5,13 @@
5
5
  # Requirements <a name="requirements"></a>
6
6
 
7
7
 
8
- |fluent-plugin-systemd|fluentd|ruby|
8
+ |fluent-plugin-systemd|fluentd|td-agent|ruby|
9
9
  |----|----|----|
10
- | 0.1.x | >= 0.14.11, < 2 | >= 2.1 |
11
- | 0.0.x | ~> 0.12.0 | >= 1.9 |
10
+ | 0.1.x | >= 0.14.11, < 2 | 3 | >= 2.1 |
11
+ | 0.0.x | ~> 0.12.0 | 2 | >= 1.9 |
12
12
 
13
13
  * The 0.1.x series is developed from this branch (master)
14
- * The 0.0.x series (compatible with fluentd v0.12) is developed on the [0.0.x branch](https://github.com/reevoo/fluent-plugin-systemd/tree/0.0.x)
14
+ * The 0.0.x series (compatible with fluentd v0.12, and td-agent 2) is developed on the [0.0.x branch](https://github.com/reevoo/fluent-plugin-systemd/tree/0.0.x)
15
15
 
16
16
  ## Overview
17
17
 
@@ -21,11 +21,11 @@
21
21
 
22
22
  Simply use RubyGems:
23
23
 
24
- gem install fluent-plugin-systemd -v 0.1.0
24
+ gem install fluent-plugin-systemd -v 0.1.1
25
25
 
26
26
  or
27
27
 
28
- td-agent-gem install fluent-plugin-systemd -v 0.6.0
28
+ td-agent-gem install fluent-plugin-systemd -v 0.1.1
29
29
 
30
30
  ## Configuration
31
31
 
data/Vagrantfile ADDED
@@ -0,0 +1,71 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
5
+ # configures the configuration version (we support older styles for
6
+ # backwards compatibility). Please don't change it unless you know what
7
+ # you're doing.
8
+ Vagrant.configure("2") do |config|
9
+ # The most common configuration options are documented and commented below.
10
+ # For a complete reference, please see the online documentation at
11
+ # https://docs.vagrantup.com.
12
+
13
+ # Every Vagrant development environment requires a box. You can search for
14
+ # boxes at https://atlas.hashicorp.com/search.
15
+ config.vm.box = "centos/7"
16
+
17
+ # Disable automatic box update checking. If you disable this, then
18
+ # boxes will only be checked for updates when the user runs
19
+ # `vagrant box outdated`. This is not recommended.
20
+ # config.vm.box_check_update = false
21
+
22
+ # Create a forwarded port mapping which allows access to a specific port
23
+ # within the machine from a port on the host machine. In the example below,
24
+ # accessing "localhost:8080" will access port 80 on the guest machine.
25
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
26
+
27
+ # Create a private network, which allows host-only access to the machine
28
+ # using a specific IP.
29
+ # config.vm.network "private_network", ip: "192.168.33.10"
30
+
31
+ # Create a public network, which generally matched to bridged network.
32
+ # Bridged networks make the machine appear as another physical device on
33
+ # your network.
34
+ # config.vm.network "public_network"
35
+
36
+ # Share an additional folder to the guest VM. The first argument is
37
+ # the path on the host to the actual folder. The second argument is
38
+ # the path on the guest to mount the folder. And the optional third
39
+ # argument is a set of non-required options.
40
+ # config.vm.synced_folder "../data", "/vagrant_data"
41
+
42
+ # Provider-specific configuration so you can fine-tune various
43
+ # backing providers for Vagrant. These expose provider-specific options.
44
+ # Example for VirtualBox:
45
+ #
46
+ # config.vm.provider "virtualbox" do |vb|
47
+ # # Display the VirtualBox GUI when booting the machine
48
+ # vb.gui = true
49
+ #
50
+ # # Customize the amount of memory on the VM:
51
+ # vb.memory = "1024"
52
+ # end
53
+ #
54
+ # View the documentation for the provider you are using for more
55
+ # information on available options.
56
+
57
+ # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
58
+ # such as FTP and Heroku are also available. See the documentation at
59
+ # https://docs.vagrantup.com/v2/push/atlas.html for more information.
60
+ # config.push.define "atlas" do |push|
61
+ # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
62
+ # end
63
+
64
+ # Enable provisioning with a shell script. Additional provisioners such as
65
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
66
+ # documentation for more information about their specific syntax and use.
67
+ # config.vm.provision "shell", inline: <<-SHELL
68
+ # apt-get update
69
+ # apt-get install -y apache2
70
+ # SHELL
71
+ end
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fluent-plugin-systemd"
8
- spec.version = "0.1.1.pre3"
8
+ spec.version = "0.1.1"
9
9
  spec.authors = ["Ed Robinson"]
10
10
  spec.email = ["ed@reevoo.com"]
11
11
 
@@ -19,7 +19,7 @@ module Fluent
19
19
  def configure(conf)
20
20
  super
21
21
  @pos_writer = PosWriter.new(@pos_file)
22
- init_journal
22
+ @journal = nil
23
23
  end
24
24
 
25
25
  def start
@@ -42,12 +42,19 @@ module Fluent
42
42
  @journal.wait(0)
43
43
  @journal.filter(*@filters)
44
44
  seek
45
+ true
46
+ rescue Systemd::JournalError => e
47
+ log.warn("#{e.class}: #{e.message} retrying in 1s")
48
+ false
45
49
  end
46
50
 
47
51
  def seek
48
52
  seek_to(@pos_writer.cursor || read_from)
49
53
  rescue Systemd::JournalError
50
- log.warn("Could not seek to cursor #{@pos_writer.cursor} found in pos file: #{@pos_writer.path}")
54
+ log.warn(
55
+ "Could not seek to cursor #{@pos_writer.cursor} found in pos file: #{@pos_writer.path}, " \
56
+ "falling back to reading from #{read_from}",
57
+ )
51
58
  seek_to(read_from)
52
59
  end
53
60
 
@@ -70,6 +77,7 @@ module Fluent
70
77
  end
71
78
 
72
79
  def run
80
+ return unless @journal || init_journal
73
81
  init_journal if @journal.wait(0) == :invalidate
74
82
  watch do |entry|
75
83
  begin
@@ -28,7 +28,6 @@ module Fluent
28
28
  end
29
29
 
30
30
  def update(c)
31
- return unless @path
32
31
  @lock.synchronize { @cursor = c }
33
32
  end
34
33
 
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.1.1.pre3
4
+ version: 0.1.1
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-02-17 00:00:00.000000000 Z
11
+ date: 2017-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,6 +112,7 @@ files:
112
112
  - LICENCE
113
113
  - README.md
114
114
  - Rakefile
115
+ - Vagrantfile
115
116
  - fluent-plugin-systemd.gemspec
116
117
  - lib/fluent/plugin/in_systemd.rb
117
118
  - lib/fluent/plugin/systemd/pos_writer.rb
@@ -122,6 +123,7 @@ files:
122
123
  - pkg/fluent-plugin-systemd-0.1.0.gem
123
124
  - pkg/fluent-plugin-systemd-0.1.1.pre.gem
124
125
  - pkg/fluent-plugin-systemd-0.1.1.pre2.gem
126
+ - pkg/fluent-plugin-systemd-0.1.1.pre3.gem
125
127
  homepage: https://github.com/reevoo/fluent-plugin-systemd
126
128
  licenses:
127
129
  - MIT
@@ -137,9 +139,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
139
  version: '0'
138
140
  required_rubygems_version: !ruby/object:Gem::Requirement
139
141
  requirements:
140
- - - ">"
142
+ - - ">="
141
143
  - !ruby/object:Gem::Version
142
- version: 1.3.1
144
+ version: '0'
143
145
  requirements: []
144
146
  rubyforge_project:
145
147
  rubygems_version: 2.6.9