back

Fields Extraction Module (mmfields)

Module Name:    mmfields

Author: Rainer Gerhards <rgerhards@adiscon.com>

Available since: 7.5.1

Description:

The mmfield module permits to extract fields. It is an alternate to using the property replacer field extraction capabilities. In contrast to the property replacer, all fields are extracted as once and stored inside the structured data part (more precisely: they become Lumberjack [JSON] properties).

Using this module is of special advantage if a field-based log format is to be processed, like for example CEF and and either a large number of fields is needed or a specific field is used multiple times inside filters. In these scenarios, mmfields potentially offers better performance than the property replacer of the RainerScript field extraction method. The reason is that mmfields extracts all fields as one big sweep, whereas the other methods extract fields individually, which requires multiple passes through the same data. On the other hand, adding field content to the rsyslog property dictionary also has some overhead, so for high-performance use cases it is suggested to do some performance testing before finally deciding which method to use. This is most important if only a smaller subset of the fields is actually needed.

In any case, mmfields provides a very handy and easy to use way to parse structured data into a it's individual data items. Again, a primiary use case was support for CEF (Common Event Format), which is made extremely easy to do with this module.

This module is implemented via the action interface. Thus it can be conditionally used depending on some prequisites.

 

Module Configuration Parameters:

Currently none.

 

Action Confguration Parameters:

Caveats/Known Bugs:

Samples:

This is a very simple use case where each message is parsed. The default separator character of comma is being used.

The following sample is similar to the previous one, but this time the colon is used as separator and data is written into the "$!mmfields" json path.

[rsyslog.conf overview] [manual index] [rsyslog site]

This documentation is part of the rsyslog project.
Copyright © 2013 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 3 or higher.