pmnull: “Do not parse” parser¶
Module Name: |
pmnull |
Author: |
Purpose¶
When a message is received it is tried to match a set of parsers to get
properties populated. This parser module unsets all attributes except
rawmsg. There usually should be no need to use this module. It may be
useful to process certain known-non-syslog messages only.
The pmnull module was originally written as some people thought it would be nice to save 0.05% of time by not unnecessarily parsing the message. We even doubt it is that amount of performance enhancement as the properties need to be populated in any case, so the saving is really minimal (but exists).
Warning
If you just want to transmit or store messages exactly in the format that
they arrived in you do not need pmnull! You can just use the rawmsg
property:
template(name="asReceived" type="string" string="%rawmsg%")
action(type="omfwd" target="server.example.net" template="asReceived")
Configuration Parameters¶
Note
Parameter names are case-insensitive; camelCase is recommended for readability.
Parser Parameters¶
tag¶
type |
default |
mandatory |
|
|---|---|---|---|
string |
no |
none |
This setting sets the tag value to the message.
syslogFacility¶
type |
default |
mandatory |
|
|---|---|---|---|
Facility |
1 |
no |
none |
This setting sets the syslog facility value. The default comes from the rfc3164 standard.
syslogSeverity¶
type |
default |
mandatory |
|
|---|---|---|---|
Severity |
5 |
no |
none |
This setting sets the syslog severity value. The default comes from the rfc3164 standard.
Examples¶
Process messages received via imtcp¶
In this example messages are received through imtcp on port 13514. The ruleset uses the parser pmnull which has the parameters tag, syslogFacility and syslogSeverity given.
module(load="imtcp")
module(load="pmnull")
input(type="imtcp" port="13514" ruleset="ruleset")
parser(name="custom.pmnull" type="pmnull" tag="mytag" syslogFacility="3"
syslogSeverity="1")
ruleset(name="ruleset" parser=["custom.pmnull", "rsyslog.pmnull"]) {
action(type="omfile" file="rsyslog.out.log")
}
Process messages with default parameters¶
In this example the ruleset uses the parser pmnull with the default parameters because no specifics were given.
module(load="imtcp")
module(load="pmnull")
input(type="imtcp" port="13514" ruleset="ruleset")
parser(name="custom.pmnull" type="pmnull")
ruleset(name="ruleset" parser="custom.pmnull") {
action(type="omfile" file="rsyslog.out.log")
}
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.