# systemd input plugin for [Fluentd](http://github.com/fluent/fluentd)
[![Build Status](https://travis-ci.org/reevoo/fluent-plugin-systemd.svg?branch=master)](https://travis-ci.org/reevoo/fluent-plugin-systemd) [![Code Climate GPA](https://codeclimate.com/github/reevoo/fluent-plugin-systemd/badges/gpa.svg)](https://codeclimate.com/github/reevoo/fluent-plugin-systemd) [![Gem Version](https://badge.fury.io/rb/fluent-plugin-systemd.svg)](https://rubygems.org/gems/fluent-plugin-systemd)
# Requirements
|fluent-plugin-systemd|fluentd|td-agent|ruby|
|----|----|----|
| 0.1.x | >= 0.14.11, < 2 | 3 | >= 2.1 |
| 0.0.x | ~> 0.12.0 | 2 | >= 1.9 |
* The 0.1.x series is developed from this branch (master)
* 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)
## Overview
**systemd** input plugin reads logs from the systemd journal
## Installation
Simply use RubyGems:
gem install fluent-plugin-systemd -v 0.1.1
or
td-agent-gem install fluent-plugin-systemd -v 0.1.1
## Configuration
**path**
Path to the systemd journal, defaults to `/var/log/journal`
**filters**
Array of filters, see [here](http://www.rubydoc.info/gems/systemd-journal/Systemd%2FJournal%2FFilterable%3Afilter) for further
documentation, defaults to no filtering.
**pos file**
Path to pos file, stores the journald cursor. File is created if does not exist.
**read_from_head**
If true reads all available journal from head, otherwise starts reading from tail,
ignored if pos file exists (and is valid). Defaults to false.
**strip_underscores**
If true strips underscores from the beginning of systemd field names.
May be useful if outputting to kibana, as underscore prefixed fields are unindexed there.
**tag**
_Required_ A tag that will be added to events generated by this input.
## Example
For an example of a full working setup including the plugin, [take a look at](https://github.com/assemblyline/fluentd)
## Dependencies
This plugin depends on libsystemd
## Running the tests
To run the tests with docker on several distros simply run `rake`
For systems with systemd installed you can run the tests against your installed libsystemd with `rake test`
## Licence etc
[MIT](LICENCE)
Issues and pull requests welcome
## Maintainer
* [Ed Robinson](https://github.com/errm)
## Contributors
Many thanks to our fantastic contributors
* [Jesus Rafael Carrillo](https://github.com/jescarri)
* [Mike Kaplinskiy](https://github.com/mikekap)
* [Sadayuki Furuhashi](https://github.com/frsyuki)
* [Richard Megginson](https://github.com/richm)
* [Masahiro Nakagawa](https://github.com/repeatedly)
* [Hiroshi Hatake](https://github.com/cosmo0920)