Loki with grafana
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.
-
AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Is there a decent tutorial on how to get it up and running on standard services such as systemd events, fail2ban etc? There is no quick start guide on their site.
Install promtail on the system where you want to get the logs from, then configure it with the paths to the log files and the address of the loki server
https://grafana.com/docs/loki/latest/send-data/promtail/?pg=oss-loki&plcmt=quick-links
Iβm currently using Dozzle. Itβs a simple way to view your container logs in real-time, in the same place. It might be too basic but itβs incredibly easy to get it up and running.
I'm also using Dozzle and it's been great for semi realtime use. I occasionally think about something for longer term logs but haven't yet had the motivation.
I use Portainer for this, though it doesnβt aggregate logs or anything. It just makes them easy to get to and read.
syslog over udp
About that I have made the simplest possible implementation of a syslog server in Rust. I use it to collect OpenWrt logs and store them on my server. ;-)
Syslog over TCP with TLS (don't want those sweet packets containing sensitive data leaving your box unencrypted). Bonus points for mutual authentication between the server/clients (just got it working and it's π - my implementation here
It solves the aggregation part but doesn't solve the viewing/analysis part. I usually use lnav on simple setups (gotty as a poor man's web interface for lnav when needed), and graylog on larger ones (definitely costly in terms of RAM and storage though)