Open gebn opened 10 months ago
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale
label.
Still looking for a solution to this!
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale
label.
Still looking for a solution to this!
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale
label.
Still looking for a solution to this!
Is your feature request related to a problem? Please describe.
There does not appear to be a way to separate contextual keys (e.g. those added by the
systemd
plugin based on journal information) from those extracted from an application message. This allows collisions, meaning otherwise trustworthy keys (e.g._HOSTNAME
) can be deliberately or inadvertently overwritten by the application.As a specific example, the
systemd
plugin produces records of the form:The first step in working with this is parsing the
MESSAGE
, however doing so using theparser
filter plugin will pollute the record with a combination of systemd (trusted) and application (untrusted) fields. Further, if there were a_HOSTNAME
key inMESSAGE
, it would overwrite the real hostname, which is a potential security issue if this key is then used for log routing.Describe the solution you'd like
A way to expand an encoded field into key/value pairs underneath a specific top-level key. Perhaps something like:
Fields that the user wants to ultimately end up in the written record can then be added/removed under the
log
key, and then that key can be specified for sending to an output, with everything else ignored, e.g.Describe alternatives you've considered
I've tried using the
nest
plugin to move theMESSAGE
inside a parent key, then usingdecode_field_as
on ajson
parser to expand it in-place, however this does not modify the record, or expands at the root level.