When an event has a filter syslog-identifier, src/system/vyos-event-handler.py reads message['SYSLOG_IDENTIFIER'] directly. Journal entries are not required to carry that field. For such an entry a KeyError is raised, the handler logs an error, and the entry is not evaluated against the events that follow in the loop, even if their pattern matches.
Steps to reproduce
set service event-handler event E1 filter pattern '.*marker.*' set service event-handler event E1 filter syslog-identifier 'someid' set service event-handler event E1 script path /bin/true set service event-handler event E2 filter pattern '.*marker.*' set service event-handler event E2 script path /bin/true commit
Then write a journal entry with no identifier, for example as root:
python3 -c "import socket; s=socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM); s.sendto(b'MESSAGE=marker test\n', '/run/systemd/journal/socket')"
Result (journalctl -u vyos-event-handler)
Unable to process message: 'SYSLOG_IDENTIFIER'
Expected
E1 does not match (the identifier differs), E2 matches and its script runs, and no error is logged.
This is the same kind of problem as T6048 (_PID missing), for another field.
I have a fix and will open a PR.