Filebeat ingest pipeline grok pattern

in path location /usr/share/filebeat/module/system/syslog/ingest/pipeline.json following pattern code grok pattern is confusing. why the double slash \\ comes for [%{POSINT:system.syslog.pid}\]

                        "grok": {
                            "field": "message",
                            "patterns": [
                                    "%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{SYSLOGHOST:system.syslog.hostname} %{DATA:system.syslog.program}(?:\\[%{POSINT:system.syslog.pid}\\])?: %{GREEDYMULTILINE:system.syslog.message}",

I think this is how the data pattern would be.If possible can you post the log related to that grok pattern.

\\ matches literly \ but in the line it doesn't has \

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.