Syslog
Format messages in the syslog formats RFC 5424 or RFC 3164 and send them to a log server or a SIEM over UDP, TCP or TLS. Typical uses: send security or audit events to a central log server.
syslog format <message>
Description
Write a message in RFC 5424
Write a message in RFC 5424
Parameters
message: The message as JSON - String - required
message: The message as JSON - String - required
admin
syslog format "{\"facility\": \"local4\", \"severity\": \"err\", \"timestamp\": \"2026-11-05T10:00:00.5Z\", \"hostname\": \"srv1\", \"app_name\": \"billing\", \"procid\": \"42\", \"msgid\": \"INV\", \"structured_data\": {\"order@32473\": {\"id\": \"F42\", \"note\": \"a \\"b\\" ]\"}}, \"message\": \"payment refused\"}"
mentdb
<163>1 2026-11-05T10:00:00.5Z srv1 billing 42 INV [order@32473 id="F42" note="a \"b\" \]"] payment refused
syslog format <message> <params>
Description
Write with parameters: rfc (5424 or 3164), timezone (of the 3164 time, UTC by default)
Write with parameters: rfc (5424 or 3164), timezone (of the 3164 time, UTC by default)
Parameters
message: The message as JSON - String - required
params: The parameters as JSON - String - required
message: The message as JSON - String - required
params: The parameters as JSON - String - required
admin
syslog format "{\"severity\": \"warning\", \"timestamp\": \"2026-11-05T10:00:00Z\", \"hostname\": \"srv1\", \"app_name\": \"billing\", \"procid\": \"42\", \"message\": \"disk 91 %\"}" "{\"rfc\": \"3164\", \"timezone\": \"Europe/Paris\"}"
mentdb
<12>Nov 5 11:00:00 srv1 billing[42]: disk 91 %
syslog send <host> <port> <message>
Description
Send over UDP. The message is JSON, a text (which becomes its message), or a line that is already formatted (it starts with). Returns {protocol, rfc, bytes, truncated, framing, note}. UDP has no answer, so the delivery is not confirmed: the note says it
Send over UDP. The message is JSON, a text (which becomes its message), or a line that is already formatted (it starts with
Parameters
host: The server - String - required
port: The port, often 514 - String - required
message: The message - String - required
host: The server - String - required
port: The port, often 514 - String - required
message: The message - String - required
admin
syslog send "127.0.0.1" "23999" "hello"
mentdb
{"protocol": "udp", "rfc": "5424", "bytes": 49, "truncated": false, "framing": null, "note": "UDP has no acknowledgement: the delivery is not confirmed"}
syslog send <host> <port> <message> <params>
Description
Send with parameters: protocol (udp, tcp, tls), rfc (5424, 3164), framing (octet: length before each message, RFC 6587 and 5425; lf: a line break after it, and line breaks in the message become spaces), timeout_ms (5000), max_bytes (the message is cut at a character boundary and truncated says so: 1024 for RFC 3164, 2048 on UDP, 65536 otherwise), bom (false; true: a byte order mark before a RFC 5424 message, which the RFC asks for UTF-8 but some servers show), timezone, ca_file (the PEM of the authority of a private server), verify (true; false disables the checks of the certificate and of the name, and tls_verified false says so). Each call opens a connection and closes it
Send with parameters: protocol (udp, tcp, tls), rfc (5424, 3164), framing (octet: length before each message, RFC 6587 and 5425; lf: a line break after it, and line breaks in the message become spaces), timeout_ms (5000), max_bytes (the message is cut at a character boundary and truncated says so: 1024 for RFC 3164, 2048 on UDP, 65536 otherwise), bom (false; true: a byte order mark before a RFC 5424 message, which the RFC asks for UTF-8 but some servers show), timezone, ca_file (the PEM of the authority of a private server), verify (true; false disables the checks of the certificate and of the name, and tls_verified false says so). Each call opens a connection and closes it
Parameters
host: The server - String - required
port: The port, often 514, or 6514 for TLS - String - required
message: The message - String - required
params: The parameters as JSON - String - required
host: The server - String - required
port: The port, often 514, or 6514 for TLS - String - required
message: The message - String - required
params: The parameters as JSON - String - required
admin
syslog send "127.0.0.1" "23999" "{\"facility\": \"local4\", \"severity\": \"err\", \"timestamp\": \"2026-11-05T10:00:00.5Z\", \"hostname\": \"srv1\", \"app_name\": \"billing\", \"procid\": \"42\", \"msgid\": \"INV\", \"structured_data\": {\"order@32473\": {\"id\": \"F42\", \"note\": \"a \\"b\\" ]\"}}, \"message\": \"payment refused\"}" "{\"protocol\": \"tcp\", \"timeout_ms\": 500}"
mentdb
ERROR: Sorry, an error appears (syslog send: cannot send to 127.0.0.1:23999 (ConnectException)).
TCP to a Python receiver (fixed result)
admin
syslog send "127.0.0.1" "23515" "{\"facility\": \"local4\", \"severity\": \"err\", \"timestamp\": \"2026-11-05T10:00:00.5Z\", \"hostname\": \"srv1\", \"app_name\": \"billing\", \"procid\": \"42\", \"msgid\": \"INV\", \"structured_data\": {\"order@32473\": {\"id\": \"F42\", \"note\": \"a \\"b\\" ]\"}}, \"message\": \"payment refused\"}" "{\"protocol\": \"tcp\"}"
mentdb
{"protocol": "tcp", "rfc": "5424", "bytes": 106, "truncated": false, "framing": "octet"}
TLS with a private authority (fixed result, Python ssl receiver)
admin
syslog send "localhost" "23516" "hello" "{\"protocol\": \"tls\", \"ca_file\": \"conf/my_ca.pem\"}"
mentdb
{"protocol": "tls", "rfc": "5424", "bytes": 49, "truncated": false, "framing": "octet", "tls_verified": true}
