Skip to content

Commit 4d0b405

Browse files
committed
Fixup field_map examples
fixes #63
1 parent ff4b328 commit 4d0b405

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
## Overview
66

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

1010
## Support
1111

@@ -53,7 +53,6 @@ If you are upgrading to version 1.0 from a previous version of this plugin take
5353
path kube-proxy.pos
5454
</storage>
5555
<entry>
56-
field_map {"MESSAGE": "log", "_PID": ["process", "pid"], "_CMDLINE": "process", "_COMM": "cmd"}
5756
fields_strip_underscores true
5857
fields_lowercase true
5958
</entry>
@@ -69,7 +68,7 @@ Path to the systemd journal, defaults to `/var/log/journal`
6968

7069
**`filters`**
7170

72-
_This parameter name is deprecated and should be renamed to `matches`_
71+
_This parameter name is depreciated and should be renamed to `matches`_
7372

7473
**`matches`**
7574

@@ -105,13 +104,17 @@ For an example of a full working setup including the plugin, [take a look at](ht
105104

106105
## Filter Plugin Configuration
107106

108-
<filter kube-proxy>
109-
@type systemd_entry
110-
field_map {"MESSAGE": "log", "_PID": ["process", "pid"], "_CMDLINE": "process", "_COMM": "cmd"}
111-
field_map_strict false
112-
fields_lowercase true
113-
fields_strip_underscores true
114-
</filter>
107+
```
108+
<filter kube-proxy>
109+
@type systemd_entry
110+
field_map {"MESSAGE": "log", "_PID": ["process", "pid"], "_CMDLINE": "process", "_COMM": "cmd"}
111+
field_map_strict false
112+
fields_lowercase true
113+
fields_strip_underscores true
114+
</filter>
115+
```
116+
117+
_Note that the following configurations can be embedded in a systemd source block, within an entry block, you only need to use a filter directly for more complicated workflows._
115118

116119
**`field_map`**
117120

@@ -136,7 +139,7 @@ If true, lowercase all non-mapped fields. Defaults to false.
136139

137140
If true, strip leading underscores from all non-mapped fields. Defaults to false.
138141

139-
### Example
142+
### Filter Example
140143

141144
Given a systemd journal source entry:
142145
```
@@ -165,10 +168,10 @@ The resulting entry using the above sample configuration:
165168

166169
> ### When I look at fluentd logs, everything looks fine but no journal logs are read
167170
168-
This is commonly caused when the user running fluentd does not have enough permisions
171+
This is commonly caused when the user running fluentd does not have the correct permissions
169172
to read the systemd journal.
170173

171-
Acording to the [systemd documentation](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html):
174+
According to the [systemd documentation](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html):
172175
> 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.
173176
174177

@@ -182,7 +185,7 @@ To run the tests with docker on several distros simply run `rake`
182185

183186
For systems with systemd installed you can run the tests against your installed libsystemd with `rake test`
184187

185-
## Licence
188+
## License
186189

187190
[Apache-2.0](LICENCE)
188191

0 commit comments

Comments
 (0)