Page MenuHomeVyOS Platform

event-handler: "Unable to process message" for journal entries without SYSLOG_IDENTIFIER
In progress, LowPublicBUG

Description

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.

Details

Version
2026.11.26-0016-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav changed the task status from Open to In progress.Mon, Nov 30, 12:01 PM
Viacheslav assigned this task to jamesperu.
Viacheslav changed the subtype of this task from "Task" to "Bug".Mon, Nov 30, 12:03 PM