I’m in the process of re-configuring my home lab and would like to get some help figuring out log collection. My setup was a hodgepodge of systems/OSes using rsyslog to send syslogs to a syslog listener on my qnap but that’s not going to work anymore (partly because the qnap is gone).

My end-goal is going to be as homogeneous as I can manage. Mostly Debian 12 systems (phy and vm) and Docker containers. Does anyone know of a FOSS solution that can ingest journald, syslog, and if it’s even possible to send docker logs to a log collector?

Thanks

DefederateLemmyMl
link
fedilink
English
1
edit-2
1Y

FWIW I use an elastic stack for that: filebeat, journalbeat to collect logs. Logstash to sort and parse them. Elasticsearch to store them. Not sure if it satisfies your FOSS requirement, as I don’t believe it’s entirely open source.

@wildbus8979@sh.itjust.works
link
fedilink
English
4
edit-2
1Y

All these new fang projects, but really I just use remote rsyslogd. Works just fine, super robust, easy setup. You can literally be up an.running within minutes.

That’s been my go-to in the past but since Debian 12 leaned into journald I was looking into ways to work with that.

It’s insane that journald doesn’t include a remote option. A feature used in industry for over two decades. 🤦

Dogeek
link
fedilink
English
51Y

You could use grafana loki to handle logs, it’s similar to Prometheus so if you’re already using that and/or grafana it’s an easy setup and the API is really simple too.

@farcaller@fstab.sh
link
fedilink
English
31Y

I second this. Loki for logs, VictoriaMetrics for metrics―it’s significantly more lightweight than ELK logging (and any lags are irrelevant for a homelab), and VM is similarly much more careful with RAM than Prometheus.

I did stumble on Grafana Loki in my search. Was trying to figure out if it was overkill. Is it fairly lightweight?

@keyez@lemmy.world
link
fedilink
English
2
edit-2
1Y

Much less intensive than an elasticsearch anything. I have Loki, grafana and 3 promtail clients running for my env (switched from Graylog/elasticsearch) and over the last few days Loki is sitting at 3GB memory and 8% CPU processing logs for about 6 devices.

Ok thanks. Looks like I can give it a try in docker.

@tko@tkohhh.social
link
fedilink
English
51Y

I use a Graylog/Opensearch/Mongodb stack to log everything. I spent a good amount of time writing parsers for each source, but the benefit is that everything is normalized to make searching easier. I’m happy with it as a solution!

@vegetaaaaaaa@lemmy.world
link
fedilink
English
2
edit-2
1Y

I also use graylog to aggregate logs from various devices (mostly from rsyslog over SSL/TLS). The only downsides for me are the license (not a big problem for a personal setup), and resource usage of the general graylog/elasticsearch stack. I still think it’s great.

I use this ansible role to install and manage it.

For simpler setups with resource constraints, I would simply use a rsyslog server as aggregator instead of graylog, and lnav for the analysis/filtering/parsing part

@Lodra@programming.dev
link
fedilink
English
61Y

You can also take a look at open telemetry. It’s a huge open source project with lots of functionality. Handles logs just fine and also can provide metrics and traces too. Might be overkill for your needs but it’s an excellent tool.

Create a post

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:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 127 users / day
  • 422 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog