Syslog message parser
Paste one syslog message, or a TCP frame carrying one, and read every field named in the order its RFC names them: the PRI opened into facility and severity, the RFC 5424 header, the structured data element by element, the message; or the BSD form of RFC 3164 with its TIMESTAMP, HOSTNAME, TAG and CONTENT. Whatever is non-compliant is said in the RFC's own words. Nothing is sent anywhere.
Operations & FieldcraftTry
RFC 5424 syslog message. 175 octets (173 characters). Nothing non-compliant found.
The PRI, opened
PRI
<165> = 20 × 8 + 5Facility20 local4 local use 4Severity5 notice Notice Normal but significant condition.The fields, in the RFC's order
| field | value | reading |
|---|---|---|
PRI | <165> | Facility × 8 + Severity in angle brackets; three to five characters (RFC 5424 §6.2.1). |
VERSION | 1 | The protocol version; this RFC's is 1 (§6.2.2). |
TIMESTAMP | 2003-10-11T22:14:15.003Z | RFC 3339 form: date, T, time, optional fraction of up to six digits, Z or an offset; or the NILVALUE (§6.2.3). date 2003-10-11, time 22:14:15.003, offset Z (UTC) |
HOSTNAME | mymachine.example.com | The originator: FQDN, static IP address, hostname or dynamic IP address, in that order of preference; 1 to 255 printable US-ASCII characters (§6.2.4). |
APP-NAME | evntslog | The device or application that originated the message; 1 to 48 characters (§6.2.5). |
PROCID | NILVALUE | A change in its value indicates a discontinuity in reporting (often the process ID); 1 to 128 characters (§6.2.6). |
MSGID | ID47 | The type of message; 1 to 32 characters (§6.2.7). |
STRUCTURED-DATA | [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"] | Zero or more elements, each [SD-ID param="value" ...]; the NILVALUE when none (§6.3). |
MSG | An application event log entry... | Free-form text; UTF-8 when it starts with the BOM, otherwise of unknown encoding (§6.4). UTF-8, declared by the BOM. |
Structured data: 1 element
exampleSDID@32473private (enterprise number)iut"3"eventSource"Application"eventID"1011"
Findings, limits and transports
- Length: 175 octets. Every receiver must accept 480; every receiver should accept 2048 (RFC 5424 §6.1).
- Transports: UDP port 514 (RFC 5426); TCP with octet counting or a trailer (RFC 6587); TLS on TCP port 6514 (RFC 5425).
API endpointGEThttps://ronutz.com/api/v1/syslog-message-parserDocumented, not served. Opens the specification.
Riferimenti
- RFC 5424, The Syslog Protocol (March 2009), sections 6 to 7
- RFC 3164, The BSD syslog Protocol (August 2001), sections 4.1 to 4.3
- RFC 5426, Transmission of Syslog Messages over UDP (March 2009), sections 3.1 and 7
- RFC 5425, TLS Transport Mapping for Syslog (March 2009), section 4.1 Port Assignment
- RFC 6587, Transmission of Syslog Messages over TCP (April 2012), sections 3.4.1 and 3.4.2