Live data from Hacker News

Monitoring demystified: A guide for logging, tracing, metrics

techbeacon.com

51–60 of 93 posts

Re: Monitoring demystified: A guide for logging, tracing, metrics

#51

Is there an open source solution for processing streams of structured and unstructured logs and routing then onward? I see solutions for moving logs to elastic or Kafka but nothing for evaluating the log.

This is a problem that is both solved again and again, but also all the available solutions are bad.

In my experience what happens is:

1. you start with a "ship logs from X to Y" product

2. you add more sources and more destinations, making it more of a central router. you add config options for specifying your sources and dests.

3. since the way you checkpoint or consume or pull or push certain sources or dests doesn't generalize, you end up buffering internally to present a unified "I have recieved / sent this message successfuly" concept to your inputs and outputs.

4. you want to do some basic transforms on the logs as you go. you implement "filters" or "transforms" or "steps" and make them configurable. your config now describes a graph of sources -> filters -> dests

5. your filters need to be more flexible. you add generic filters whose behaviour is mostly controlled by their config options. your configs grow more complicated as you use multiple layers of differently-configured filters

6. you have a bad turing complete programming language embedded in your config file. getting simple tasks done is possible, getting complex tasks done becomes an awful, inefficient and unreadable mess.

My solution to this cycle has been to just write simple hard-coded applications that can only do the job I need them to do. If they need a different configuration later I edit the source. I'm writing my transforms in a real programming language and I avoid the additional complexity of abstractions. Of course, that comes with its own costs but I consider it well worth it.

Re: Monitoring demystified: A guide for logging, tracing, metrics

#52
post #37
post #27

Earlier quoted context omitted.

If it saves you more than an hour or two, $300 seems super worth it for a system making you money...

It depends where you are in the world. When I was working in Switzerland, most SaaS pricing were no-brainers for us. But since I work in Latin America for small companies with local costumers, all the different services and tools you might want to use, with prices targeted at "western" customers, much more quickly add up to the equivalent of having multiple people on staff full time. Still it is often not worth to ro…

> It depends where you are in the world.

Exactly this. We operate in Eastern Europe with local clients, offering on-prem SaaS. If I added all my clients' servers on datadog it would very easily eat through our profit margins.

> Still it is often not worth to roll your own

I tried hard not to, but at at the end, after spending 1 week trying to setup netdata and failed, I decided not to spend another week trying to setup grafana/influx/prometheus (lot's of docs to go through), and just have some bash scripts send metrics on a $10 digital ocean node service that sends me emails/sms when something "looks bad" (eg. high cpu temperature, stopped docker containers, etc).

I gave up on aggregated logging for the time being, since I can just ssh on each server and check journal and docker logs if I need to (as long as the hard drives don't crash).

Re: Monitoring demystified: A guide for logging, tracing, metrics

#53

We log extensively. Here are some of my thoughts it - at least in C++, the requirement to be able to log from pretty much anywhere can lead to messy code that either passes a reference to your logger to all classes that might possibly need it, or you've got an extern global somewhere. Yuck. - logging can enable laziness. Being able to log that something weird happened can be considered a sufficient substitute for pro…

Expanding on your second point, logging is also not a substitute for proper error handling.

Re: Monitoring demystified: A guide for logging, tracing, metrics

#54
post #44

Earlier quoted context omitted.

I agree with this wholeheartedly. You can even define a standard and let downstream services opt in over time. Simple wins like this should not be put off because "someday" we're going to implement a complex distributed tracing solution.

So, in terms of full implementation, is the constraint the dev time to implement, or getting various factions to agree to something? I guess, is it political, or technical? Asking for a friend. Thanks!

Often it's political, but political friction can feed into technical friction if there are also a half dozen different half wrappers around half-baked HTTP libraries. Also, if someone has included OpenTracing as a shadow library in a company-wide library (JVM territory), but you want it as a top-level dependency, you have to write translators.

Re: Monitoring demystified: A guide for logging, tracing, metrics

#55
post #46

Earlier quoted context omitted.

> Grafana Cloud offers a hosted Grafana, Prometheus metrics scraping and storage, and Log tailing and storage (via Loki) I haven't looked at their pricing before, but for small-ish environments, their standard plan looks really good and simple. None of the "per host, but also per function, and extra for each feature, and extra for usage" approach like other providers (datadog, I'm looking at you).

> None of the "per host, but also per function, and extra for each feature, and extra for usage" approach like other providers (datadog, I'm looking at you). I was thinking "God, this is exactly why I hate Datadog" as I was reading your description and got a great laugh when I reached the end. Their billing is absolutely byzantine. I don't know that I've ever seen a company that had such a stark difference between gr…

For APM and Front-end monitoring, you can try https://www.atatus.com/

Re: Monitoring demystified: A guide for logging, tracing, metrics

#56
post #46

Earlier quoted context omitted.

> None of the "per host, but also per function, and extra for each feature, and extra for usage" approach like other providers (datadog, I'm looking at you). I was thinking "God, this is exactly why I hate Datadog" as I was reading your description and got a great laugh when I reached the end. Their billing is absolutely byzantine. I don't know that I've ever seen a company that had such a stark difference between gr…

I'm a customer that uses most of their tools (no network performance monitoring since it's less useful than a service mesh and no logging because we need longer history than most and cost would be prohibitive). Is it really that expensive when compared to other vendors? Thought their newer logging tool was a lot cheaper than splunk and their apm tool for distributed tracing is also pretty cheap when compared with som…

It's not so much the total cost, but the fact that there's so much nickel and diming. When Trace Analytics came out they tried getting us to turn it on, and its like...we're already paying for APM and you want to charge us more, at least tell us how much more and they couldn't. I think it probably ended up not being a ton of money, but just the question was enough for us to not do it. From working with other providers, it's also much easier working with our finance if we can say 'it costs at most this' instead of 'it costs at least this'

Re: Monitoring demystified: A guide for logging, tracing, metrics

#57
post #5

> Logging is critical to detecting attacks and intrusions. Yes, but not universally - and just collecting logs will not take you far. Logging everything and trying to approach security via the ’collect all data’ is both expensive and inaccurate, and one of the major inefficiencies in modern cyber.

This is done efficiently at scale by both Cylance and Crowdstrike, but is certainly only one part of a defense in depth strategy. There are viable products around human threat hunting which would be impossible without a 'collect all the data' component.

Security Onion does an amazing job at collecting and correlating, especially for an open source product. The traditional trade of with Open Source is there - a bit of up front effort for longer term value.

Re: Monitoring demystified: A guide for logging, tracing, metrics

#58

Is there an open source solution for processing streams of structured and unstructured logs and routing then onward? I see solutions for moving logs to elastic or Kafka but nothing for evaluating the log.

>Is there an open source solution for processing streams of structured and unstructured logs and routing then onward?

https://securityonion.net

It doesn't route them onward - it will collect, aggregate and provide you the tools to correlate/analyze logs across your environment. Enable the built in network monitoring tools too and you have not only a powerful tool to help you with application management, but security as well (hence its namesake).

Beware - in pealing back the layers of your environment you can really get sucked in. I never seem to have enough hardware to do what I want with SO but it's pretty amazing what you can do with it.

EDIT - wow, I'm a little shocked that no one else has brought Security Onion up. I guess they need to up their advertising game!

Re: Monitoring demystified: A guide for logging, tracing, metrics

#59

A few things I have learnt along the way: Logs are great, but only once you've identified the problem. If you are searching through logs to _find_ a problem, its far too late. Processing/streaming logs to get metrics is a terrible waste of time, energy and money. Spend that producing high quality metrics directly from the apps you are looking after/writing/decomming (example: dont use access logs to collect 4xx/5xx a…

> Processing/streaming logs to get metrics is a terrible waste of time, energy and money.

Only if you're using Elastic.

Re: Monitoring demystified: A guide for logging, tracing, metrics

#60
If you don't need all the fancy metrics, and just want something simple to keep an eye on your services, alert you if they fail, and automatically restart them, check out my stealthcheck service. It's all of 150 lines of free range, 0-dependency go:

https://github.com/anderspitman/stealthcheck

Post reply on HN