feat(logging): ship all app logs to Loki and add Grafana Alloy syslog receiver #5
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/loki-logging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Note:
5c653c0is afixup!commit for3792441(replacing EOL Promtail with Grafana Alloy) ready forgit rebase --autosquashbefore/at merge.Evidence
solidtimeconfigured the Loki Docker log driver, onlyDevelopmentenabledhomelab.apps.logging.client,pgadminwas inline inhosts/Development/default.nix, Forgejo logged tofile, and no remote syslog receiver existed for TrueNAS.Niko,Ingress,Gitea,Vaultwarden,Binnenpost,Production,ProductionGPU,ProductionArr,ACE,Template,Development,Testing) evaluate cleanly vianix eval .#nixosConfigurations.<host>.config.system.build.toplevel.drvPath(exit 0).changedetectionmodule evaluates cleanly withlog-driver = "loki".Binnenpost'sdocker-alloy.serviceunit builds cleanly andalloy validateon the generatedconfig.alloyexits0.loki,grafana, andalloycontainers remain on localjournaldlogging to avoid self-logging loops.Merge Danger
Door: Two-way
All changes are declarative NixOS module/host configurations and roll back via previous NixOS generations. Containers retain local rotated log files (
keep-file=true) and usemode=non-blocking.Blast Radius: Fleet-wide
Deploying will install the
grafana/loki-docker-driverplugin and recreate Docker containers on all 9 container hosts (Binnenpost,Development,Gitea,Vaultwarden,Production,ProductionArr,ProductionGPU,Testing,Niko), switch Forgejo to console logging, enable Traefik access logs, and expose TCP port1514onBinnenpostfor TrueNAS syslog (192.168.0.89:1514, TCP / RFC5424).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.