Maybe it would help if we looked at the structure of a message that is going into the syslog so we are on the same page. I can't pretend to understand this, and of course we are using a big hammer on a small thumbtack. (For example, I don't think we have any multiline messages from AsusWRT, in the sense that syslog-ng understands them).
Here's one log entry at random:
Code:
Feb 10 11:49:07 RT-AC87R miniupnpd[2616]: Listening for NAT-PMP/PCP traffic on port 5351
If I follow the way syslog-ng parses this, there is no priority at the beginning of the line, so no PRI part of this.
The date stamp and "RT-AC87R" is the HEADER part of the message, divided into the timestamp and the hostname.
All the rest is MSG part, divided into the name of the program and the message text, divided by the ":" Here, the name of the program includes the pid in brackets. I believe program() returns the program name, without the PID. msghdr() returns both. (Fun, isnt it: msghdr parses a portion of the msg part, and not the header part)
That's why I think program("Skynet") works. match("Skynet:") in value("MESSAGES") does too, but wouldn't if there was a PID. Also, match() in value() is now just message().
Note that used in the filter, this program() is different than the program() in the sources, which uses another program to collect log messages.