fluent-plugin-systemd 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14abb1b9c6b985bbaee61aae73791108578c738e
4
- data.tar.gz: ab54b3167ad1832efd73d15eff17d0b4ed2d6e0a
3
+ metadata.gz: c2cebb67ce9b89e20f0354bdbb45f7f3c8f1c817
4
+ data.tar.gz: b59f85ccd7e8550cdf7835c2fa3449406e9c0769
5
5
  SHA512:
6
- metadata.gz: 26dca0c3b93b49899fbb903ccfc66f79d9f2ded5416ce1bdd28b920b83583a4de29c812a426aabe9aad4b5718055b532f2fcaa6c2b15d77e4ea8bcb46fcebe23
7
- data.tar.gz: a715f762f61481b93c1179af10c30f978cbafad7c01ffdd136a79e6d21757d5ce449f59640887d875fc74327c1c1c51d2d09a08eee1a0f1760054ecfc111c9e7
6
+ metadata.gz: 8a115c1eb388b1263f933d1f3283c84b6dbbfc4093756842095879c7f07312c0562ccbf87093fb4defd643e17cc5219569c795a48e82f3e79200990d8b22360f
7
+ data.tar.gz: ba30dc865abe28b552379c7a680f6ffff3303990d98eea0747d4bda5810a585cbb866c9410a57302e6f4e9e5385d33894c0dacaca192fec4c207f5dc2e17917c
data/README.md CHANGED
@@ -28,11 +28,11 @@ Join the #plugin-systemd channel on the [Fluentd Slack](http://slack.fluentd.org
28
28
 
29
29
  Simply use RubyGems:
30
30
 
31
- gem install fluent-plugin-systemd -v 0.3.0
31
+ gem install fluent-plugin-systemd -v 0.3.1
32
32
 
33
33
  or
34
34
 
35
- td-agent-gem install fluent-plugin-systemd -v 0.3.0
35
+ td-agent-gem install fluent-plugin-systemd -v 0.3.1
36
36
 
37
37
  ## Input Plugin Configuration
38
38
 
@@ -167,6 +167,17 @@ The resulting entry using the above sample configuration:
167
167
  }
168
168
  ```
169
169
 
170
+ ## Common Issues
171
+
172
+ > ### When I look at fluentd logs, everything looks fine but no journal logs are read
173
+
174
+ This is commonly caused when the user running fluentd does not have enough permisions
175
+ to read the systemd journal.
176
+
177
+ Acording to the [systemd documentation](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html):
178
+ > Journal files are, by default, owned and readable by the "systemd-journal" system group but are not writable. Adding a user to this group thus enables her/him to read the journal files.
179
+
180
+
170
181
  ## Dependencies
171
182
 
172
183
  This plugin depends on libsystemd
@@ -177,11 +188,17 @@ To run the tests with docker on several distros simply run `rake`
177
188
 
178
189
  For systems with systemd installed you can run the tests against your installed libsystemd with `rake test`
179
190
 
180
- ## Licence etc
191
+ ## Licence
181
192
 
182
193
  [MIT](LICENCE)
183
194
 
184
- Issues and pull requests welcome
195
+ ## Contributions
196
+
197
+ Issues and pull requests are very welcome.
198
+
199
+ If you want to make a contribution but need some help or advice feel free to message me @errm on the [Fluentd Slack](http://slack.fluentd.org/), or send me an email ed@reevoo.com.
200
+
201
+ We have adopted the [Contributor Covenant](CODE_OF_CONDUCT.md) and thus expect anyone interacting with contributors, maintainers and users of this project to abide by it.
185
202
 
186
203
  ## Maintainer
187
204
 
@@ -191,10 +208,11 @@ Issues and pull requests welcome
191
208
 
192
209
  Many thanks to our fantastic contributors
193
210
 
194
- * [Jesus Rafael Carrillo](https://github.com/jescarri)
195
- * [Mike Kaplinskiy](https://github.com/mikekap)
196
- * [Sadayuki Furuhashi](https://github.com/frsyuki)
197
- * [Richard Megginson](https://github.com/richm)
198
- * [Masahiro Nakagawa](https://github.com/repeatedly)
199
211
  * [Hiroshi Hatake](https://github.com/cosmo0920)
212
+ * [Erik Maciejewski](https://github.com/emacski)
213
+ * [Masahiro Nakagawa](https://github.com/repeatedly)
214
+ * [Richard Megginson](https://github.com/richm)
215
+ * [Mike Kaplinskiy](https://github.com/mikekap)
200
216
  * [neko-neko](https://github.com/neko-neko)
217
+ * [Sadayuki Furuhashi](https://github.com/frsyuki)
218
+ * [Jesus Rafael Carrillo](https://github.com/jescarri)
@@ -6,7 +6,7 @@ require "fluent/plugin/systemd/entry_mutator"
6
6
 
7
7
  module Fluent
8
8
  module Plugin
9
- class SystemdInput < Input
9
+ class SystemdInput < Input # rubocop:disable Metrics/ClassLength
10
10
  Fluent::Plugin.register_input("systemd", self)
11
11
 
12
12
  helpers :timer, :storage
@@ -61,6 +61,8 @@ module Fluent
61
61
  private
62
62
 
63
63
  def init_journal
64
+ # TODO: ruby 2.3
65
+ @journal.close if @journal # rubocop:disable Style/SafeNavigation
64
66
  @journal = Systemd::Journal.new(path: @path)
65
67
  # make sure initial call to wait doesn't return :invalidate
66
68
  # see https://github.com/ledbettj/systemd-journal/issues/70
@@ -128,7 +130,12 @@ module Fluent
128
130
 
129
131
  def watch
130
132
  while @journal.move_next
131
- yield @journal.current_entry
133
+ begin
134
+ yield @journal.current_entry
135
+ rescue Systemd::JournalError => e
136
+ log.warn("Error Parsing Journal: #{e.class}: #{e.message}")
137
+ next
138
+ end
132
139
  @pos_storage.put(:journal, @journal.cursor)
133
140
  end
134
141
  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.3.0
4
+ version: 0.3.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-07-25 00:00:00.000000000 Z
11
+ date: 2017-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '1.2'
95
+ version: '1.3'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '1.2'
102
+ version: '1.3'
103
103
  description: This is a fluentd input plugin. It reads logs from the systemd journal.
104
104
  email:
105
105
  - ed@reevoo.com