Migrating from elastic to Loki and have Loki running and Alloy installed on a couple of machines. Was about to start writing some log processing expressions for common things like linux system logs, apache, nginx, iptables… and thought rather than do this myself there must be some sort of central repo for this.
I don’t think there is one, but I suspect you can find some examples online pretty easily.
Grafana Loki is fundamentally different from ElasticSearch. You do not need to excessively parse your logs during ingestion. I’d argue most of the time you’ll probably want to parse just the timestamp so you can have accurate timestamp on your logs, keep the log lines intact, and leave the rest of processing to queries. Therefore most of the log pipeline should be pretty easy to write. For example this is what we have for our Nginx instances (this is using Grafana Agent, actually, the predecessor of Grafana Alloy, but the configuration is pretty close):