I've run an rsyslog server at our organization for a decade or so now. When we get a new device we want to centralize the logging for, we point it at the rsyslog server's IP address and away it logs.
Every log line has always had a timestamp followed by the sending host's IP address (or sometimes hostname), and until this week I just thought that the rsyslog server added that into the log automatically (possibly doing rdns on it).
But this week we got a new network appliance that sends syslog messages in, and rsyslog records the log lines with no source IP or any other way to distinguish who the sender was, which is not something we've encountered before.
So, I understand I can actually ask the rsyslog server to record the sender IP (for senders who already include their own IP in the message this will create some redundancy but I am fine with that), using templates. But the documentation for how to do templates is complex and difficult to follow, and the rsyslog docs recommend a newer template() syntax anyway which I cannot find many examples for online because everyone still appears to be using $template instead.
I have even tried asking GPT-4 for an example, but it does not appear to be properly versed on the new syntax either and even using the old syntax it adds all kinds of complications into the template that I never asked for and that seriously muddy the waters of properly understanding what syntax I am looking at.
For some extra background: I'm not using any other complexities like forwarders or other software to parse the logs (aside from a handful of scripts I wrote myself that will not be deterred by the planned change in syntax), I just want to be able to grep /var/log/syslog for the sender IP and as a result see what it sent. :)