Logs

Syslog (RFC 5424)

Parses RFC 5424 syslog messages.

Try it in RegexPro

Pattern

regexJavaScript
/^<(\d{1,3})>(\d+) (\S+) (\S+) (\S+) (\S+) (\S+) (.*)$/

Raw source: ^<(\d{1,3})>(\d+) (\S+) (\S+) (\S+) (\S+) (\S+) (.*)$

How it works

Captures priority, version, timestamp, hostname, app-name, procid, msgid, and message content from standard structured syslog entries.

Examples

Input

<165>1 2023-10-11T22:14:15.003Z mymachine.example.com evntslog - ID47 - Application event

Matches

  • <165>1 2023-10-11T22:14:15.003Z mymachine.example.com evntslog - ID47 - Application event

Common use cases

  • Log aggregation
  • SIEM tools
  • Cloud observability