Log Management solutions

I’m creating an application in AWS that uses Kubernetes and some bare EC2. I’m trying to find a good log management solution but all hosted offerings seem so expensive. I’m starting my own company and paying for hosting myself so cost is a big deal. I’m considering running my own log management server but not sure on which one to choose. I’ve also considered just uploading logs to CloudWatch even though their UI isn’t very good. What has others done to manage logs that doesn’t break the bank?

EDIT:
Per /u/tydock88 's recommendation I tried out Loki from Grafana and it’s amazing. Took literally 1 hour to get setup (I already had prometheus and grafana running) and it solves exactly what I need. It’s fairly basic compared to something like Splunk, but it definitely accomplish my needs for very cheap. Thanks!

Running ELK on your own ec2 would probably be the cheapest, at the expense of time spent managing it.

Check out https//apex.sh/logs, there’s a cloudwatch integration that’ll ship all your AWS logs to it, or you can use the API of course

Yeah, I’ve ran ELK before and wasn’t crazy about it. Especially maintaining it. But you might be right it’s the cheapest solution

If you’re trying to run on a tight budget, it’s hard to beat cloudwatch. The ui is atrocious though.

Although it is not technically “log management” (I would argue it’s actually much more valuable) Honeycomb.io with dynamic sampling allows you to control costs somewhat via the sampling rate.

This seems really interesting, but am I reading it right that you can only host it yourself in Google Cloud?

At the moment yep (I’m the author), but you can ship logs from anywhere, I host all my products on AWS but use it for my logging

Check out Loki by Grafana labs

You might be the winner. This seems adequate for my needs and I’m already running prometheus and Grafana. Thanks for the recommendation!

I actually heard about this before but totally forgot about it. I obviously didn’t need it at the time haha

Awesome, it looks pretty nice but I don’t think I want to setup a GCP account just for logs. If it was in AWS I would probably be all over it. Cool product though!

I’d seriously consider https://apex.sh/logs/#pricing

Made by the same guy as ExpressJS et al. Beautiful and super competitive solution.

It’s already mentioned in another post, by the author himself. :wink:

Loki is fantastic and promtail is fairly flexible. I started using it a few months ago and love it. There is one thing you need to consider (at least afaik, if someone can correct me please do). There’s no direct way to inject cloudwatch logs into loki so things like Lambda, RDS, etc will require a second way and this is where problems could arise. Cloudwatch logs has an unbelievably low API limit on GetLogs (10/sec) so depending on how many resources you have outside kube, you could run up against these limits quickly.

My solution was to write Lambda “listeners” that get triggered by events entering cw logs and pushes them out to a fluentd setup which then injects them into loki with the proper tags. You can also just use Loki’s HTTP api directly if you want to avoid fluent.

Loki and Cortex are my favorite pieces of open source software right now!

That’s not been my experience. Loki is way cheaper to run than ELK as it requires much less resources. I run Loki, Grafana, Prometheus, Grafana Image Renderer and StatsD-Exporter as docker containers processing metrics from 400-600 ec2 instances using node-exporter and out of our app on 180 instances using the prometheus go library scraping each every 15 seconds. I also inject logs from both promtail and loki from several sources. I am running all the whole stack on a t3.large with plenty of headroom to spare.

Now I grant you that I’ve probably not touched the surface of what Loki (or this whole stack) can do but it is crazy efficient. My experience is that you’d need at least double that just to run logstash properly without spending some time tweaking it’s settings.

Have you tried CloudWatch Logs Insights (not the original UI)? You don’t get as many bells and whistles as something like Splunk or Sumo but for 90% of what I do it’s enough. Before insights we used to pipe things to an ELK stack but it wasn’t cheap to run.

/u/iadkent makes a very valid point. APM is extremely important as it’ll help you diagnose performance issues that logs simply won’t. Honeycomb is fine for low use applications and it’s absolutely worth using in the early days because of the stupid simple setup though I argue that depending on your budget, something like datadog might be better as their offering is significantly more robust.

Either way, Look into honeycomb and if you feel that’s all you’ll ever need then I would suggest checking out the OpenTelemetry project as it provides what honeycomb provides and you can visualize the data in Grafana which is a huge plus considering that you are already using prometheus and will (likely) be using loki)

My 2 cents.

There’s a solution for ECS at least using Firelens and fluent-bit to ship to loki.

Depending on your daily log volume and budget [Scalyr] (https://www.scalyr.com/pricing) could work for your use-case.

Disclaimer: I am currently employed by Scalyr. Feel free to DM me if you want some more info.

Cloudwatch logs with the awslogs project to search, tail, etc from the command line:

https://github.com/jorgebastida/awslogs