Ubuntu log monitoring

Hi All,
I may be being really stupid here, but can anyone point me in the direction of a Alloy configuration for extracting logs from a ubuntu server please?
I’ve totally thrown myself with different examples I’ve seen, not sure which ones are better than others!

To configure Alloy to collect logs you would normally need three blocks:

  • source (normally loki.source.file combined with file match, if it’s local)
  • loki.process (this is optional if you don’t need to process logs)
  • loki.write

There is an example here Monitor Linux servers with Grafana Alloy | Grafana Alloy documentation