filenamerules

Defines lognorm rules to parse json-file log filenames for metadata.

This parameter applies to Kubernetes Metadata Module (mmkubernetes).

Name:

filenamerules

Scope:

action

Type:

word

Default:

SEE BELOW

Required?:

no

Introduced:

at least 8.x, possibly earlier

Description

Note

This directive is not supported with liblognorm 2.0.2 and earlier.

When processing json-file logs, these are the lognorm rules to use to match the filename and extract metadata. The default value is:

rule=:/var/log/containers/%pod_name:char-to:_%_%namespace_name:char-to:_%_%contai\
ner_name_and_id:char-to:.%.log

Note

In the above rules, the slashes \ ending each line indicate line wrapping - they are not part of the rule.

Action usage

action(type="mmkubernetes" filenameRules="...")

See also

See also Kubernetes Metadata Module (mmkubernetes).


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.