Open chatziko opened 1 month ago
RFC 5424 seems allow the use of the NILVALUE "-" in place of a timestamp. In fact applications must use it if they don't have access to a clock.
NILVALUE
A syslog application MUST use the NILVALUE as TIMESTAMP if the syslog application is incapable of obtaining system time.
However parse_syslog does not accept an empty timestamp, as can be seen in the VRL playground:
parse_syslog
# This falis .a = parse_syslog!( s'<7>1 - foo bar - - - message' ) # This succeeds .a = parse_syslog!( s'<7>1 2020-03-13T20:45:38.119Z foo bar - - - message' )
sources: syslog: type: syslog address: 0.0.0.0:514 mode: udp
vector 0.41.1 (x86_64-unknown-linux-gnu 745babd 2024-09-11 14:55:36.802851761)
2024-09-25T12:21:55.927638Z ERROR source{component_kind="source" component_id=syslog component_type=syslog}: vector::internal_events::socket: Error receiving data. error=ParsingError(unable to parse input as valid syslog message) error_code="socket_receive" error_type="reader_failed" stage="receiving" mode=udp internal_log_rate_limit=true
Thanks for this report @chatziko ! I think you meant to link to this part of the RFC.
Fixed, thanks for the quick response.
A note for the community
Problem
RFC 5424 seems allow the use of the
NILVALUE
"-" in place of a timestamp. In fact applications must use it if they don't have access to a clock.However
parse_syslog
does not accept an empty timestamp, as can be seen in the VRL playground:Configuration
Version
vector 0.41.1 (x86_64-unknown-linux-gnu 745babd 2024-09-11 14:55:36.802851761)
Debug Output
Example Data
<7>1 - foo bar - - - message ### Additional Context _No response_ ### References _No response_