Skip to content

Commit ff4b328

Browse files
committed
Adds documentation about upgrading to 1.0.0
1 parent 78340f5 commit ff4b328

File tree

2 files changed

+57
-20
lines changed

2 files changed

+57
-20
lines changed

README.md

+5-20
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Overview
66

7-
**systemd** input plugin reads logs from the systemd journal
7+
**systemd** input plugin reads logs from the systemd journal
88
**systemd** filter plugin allows for basic manipulation of systemd journal entries
99

1010
## Support
@@ -35,6 +35,10 @@ or
3535

3636
td-agent-gem install fluent-plugin-systemd -v 0.3.1
3737

38+
## Upgrading
39+
40+
If you are upgrading to version 1.0 from a previous version of this plugin take a look at the [upgrade documentation](docs/upgrading.md). A number of deprecated config options were removed so you might need to update your configuration.
41+
3842
## Input Plugin Configuration
3943

4044
<source>
@@ -76,34 +80,15 @@ reading all logs from the journal.
7680
See [matching details](docs/Matching-Details.md) for a more exhaustive
7781
description of this property and how to use it.
7882

79-
**`pos_file`**
80-
81-
_This parameter is deprecated and will be removed in favour of storage in v1.0._
82-
83-
84-
Path to pos file, stores the journald cursor. File is created if does not exist.
85-
8683
**`storage`**
8784

8885
Configuration for a [storage plugin](http://docs.fluentd.org/v0.14/articles/storage-plugin-overview) used to store the journald cursor.
8986

90-
_Upgrading from `pos_file`_
91-
92-
If `pos_file` is specified in addition to a storage plugin with persistent set to true, the cursor will be
93-
copied from the `pos_file` on startup, and the old `pos_file` removed.
94-
9587
**`read_from_head`**
9688

9789
If true reads all available journal from head, otherwise starts reading from tail,
9890
ignored if pos file exists (and is valid). Defaults to false.
9991

100-
**`strip_underscores`**
101-
102-
_This parameter is deprecated and will be removed in favour of entry in v1.0._
103-
104-
If true strips underscores from the beginning of systemd field names.
105-
May be useful if outputting to kibana, as underscore prefixed fields are unindexed there.
106-
10792
**`entry`**
10893

10994
Optional configuration for an embeded systemd entry filter. See the [Filter Plugin Configuration](#filter-plugin-configuration) for config reference.

docs/upgrading.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Upgrading
2+
3+
## To Version 1.0
4+
5+
Version 1.0 removes a number of configuration options that had been deprecated by previous versions of the plugin. This was done to reduce the size of the code base and make maintenance simpler.
6+
7+
If you have been paying attention to (and fixing) the deprecation warnings introduced by previous versions of the plugin then there is nothing for you to do. If you have not already done so it is recommended to first upgrade to version `0.3.1` and fix any warnings before trying version `1.0.0` or above.
8+
9+
Version 1.0 of fluent-plugin-systemd only supports fluentd 0.14.11 and above (including fluentd 1.0+), if you are using tdagent you need to be using version 3 or above.
10+
11+
### `pos_file`
12+
13+
Previous versions of the plugin used the `pos_file` config value to specify a file that the position or cursor from the systemd journal would be written to. This was replaced by a generic fluentd storage block that allows much more flexibility in how the cursor is persisted. Take a look at the [fluentd documentation](https://docs.fluentd.org/v1.0/articles/storage-section) to find out more about this.
14+
15+
Before you upgrade to 1.0 you should migrate `pos_file` to a storage block.
16+
17+
```
18+
pos_file /var/log/journald.pos
19+
```
20+
21+
could be rewritten as
22+
23+
```
24+
<storage>
25+
@type local
26+
persistent true
27+
path /var/log/journald_pos.json
28+
</storage>
29+
```
30+
31+
If you want to update this configuration without skipping any entries if you supply the `pos_file` and a storage block at the same time version `0.3.1` will copy the cursor from the path given in `pos_file` to the given storage.
32+
33+
### `strip_underscores`
34+
35+
The legacy `strip_underscores` method is removed in version `1.0.0` and above. The same functionality can be achieved by setting the `fields_strip_underscores` on an entry block. The entry block allows many more options for mutating journal entries.
36+
37+
```
38+
strip_underscores true
39+
```
40+
41+
should be rewritten as
42+
43+
```
44+
<entry>
45+
fields_strip_underscores true
46+
</entry>
47+
```
48+
49+
### `filters`
50+
51+
In version 1.0.0 the `filters` parameter was renamed as `matches` in order to more closely align the plugin with the names used in the systemd documentation. `filters` is deprecated and will be removed in a future version. Other than renaming the parameter no changes have been made to it's structure or operation.
52+

0 commit comments

Comments
 (0)