This is a very specific question. Are you consuming logs from disk or in some streaming fashion like Kafka, ZeroMQ or a socket?
If you have files on disk, the easiest might be to pipe the logs through some filter prefixing each line before passing it on to the collector. E.g, this would do sed ‘s/^/zeek_filename=“conn.log”/g’ < conn.log
But… I’m not familiar with the software/setup you’re working with. Does that help at all?
@alexdinoon - I looked at the Cisco SNA docs (looks pretty cool! I wasn’t aware Cisco had this integration). If you’re working on this in a professional context/capacity, you should familiarize yourself with Zeek’s logging framework and Zeek plugin development and decide whether you’d opt for implementing a UDP based log writer, use logstash or some other log forwarder to munge Zeek logs before sending them to Cisco’s SNA UDP endpoint, or check if the JavaScript below does the job for you. This feels a bit of a design/product decision on your end.
For the sake of testing and prototyping an integration with Cisco SNA, the following JavaScript snippet sends UDP packets with the expected jsonl format to the host/port as configured. Note that if you end up using this, you’re required to keep the license, even if it’s just a few lines of code.
After some input and testing efforts from @medtemo between the years, the default format of the zeekjs-udp-logging package should now be compatible with what Cisco SNA expects. If anyone else here could test and confirm, that would be amazing.