Ask HN: Best monitoring system?

135 points by mspaulding06 ↗ HN
At my company I'm considering switching us from Nagios to another monitoring system and starting to do some research. What's the best monitoring solution out there today? I'm pretty impressed by Prometheus, but just like to get some more opinions.

127 comments

[ 0.31 ms ] story [ 157 ms ] thread
Prometheus is the clear winner
I think it depends on your needs and software, how much time you want to invest, what you want to monitor, do you want to maintain it or you want saas?

You want metrics from counters you build in your app? (see statsd?)

You want to aggregate and do analysis on logs? (see ELK stack?)

You want to monitor cloud infrastructure (see stackdriver?)

You want to run end to end tests on your application to ensure it's behaving? (see runscope?)

As your application grows, you probably want a blend of tools to see inside your app.

Just my opinion, but I won't use Prometheus, because of the active polling model. It won't scale without a number of workarounds.

My preferred method is Icinga2 (a Nagios clone with better configuration and clustering built-in) with reports coming in via passive NSCA. Toss in Graphite (or I'm warming up to Grafana on Influx) with some ability to write alerts against those reported metrics, and you're as close to ideal as I can come up with.

Of course, that requires a fair bit of up-front knowledge to stand up and operate, but they're so rock solid (and scale like mad) I have a hard time not recommending them.

Active polling scales _better_ than the alternative. You directly manage the ingest rate at the server side, rather than DDOSing your monitoring infrastructure when you scale out your services to deal with load.
> You directly manage the ingest rate at the server side

Why in the world would you want to manage (which I'm reading as throttle) the ingest rate of a monitoring service? That strikes me as a recipe for missing important events.

Monitoring should be a fairly stable load rate. If you're setting up monitoring, and your machine can't handle the load of all the data points coming in, you need to shard out, not drop data points.

> Active polling scales _better_ than the alternative

Exceptional claims require exceptional evidence. Personally, I have never heard of anything that is actively pinging outside services performing better than receiving and processing data passively.

Prometheus will scale better than Nagios running active checks since it won't be using subprocesses, but it is still going to require more overhead than a service receiving passive reports.

The pulling itself has never been a scaling/bottleneck concern in Prometheus, especially since no individual events are transferred, but just the current state of each metric. The bottleneck is usually the storage's sustained ingestion speed (disk IO or similar).

A single big Prometheus server can easily do millions of time series, and in an older record, 800,000 samples stored per second. You could monitor e.g. 10,000 hosts with that with quite some detail, and the bottleneck is still not the pull aspect.

You are wrong about that. There is nothing inherent in a polling model that limits its ability to scale. You simply shard based on service or pod, or row(whatever your unit of scale is) and then you can always use consistent hashing/federation. Prometheus is a single binary. How many moving parts are involved in a Icinga 2 cluster?
Two. Icinga2 and nsca-ng. You can bring it down to one if you use Icinga2 as the test runner on the individual machines.

If you need to shard, no other binaries are involved, just a couple of changed configuration files and some SSL certs. Passive reports can go to any node; a simple load balancer will work fine without any form of hashing or federation required.

> There is nothing inherent in a polling model that limits its ability to scale

Aside from the additional processing requirements, such as SSH, NRPE, subprocesses, etc, you are also limited in that a polling process must be told in advance of new systems or services, whereas it's fairly easy to just have a new service or system start reporting and be immediately monitored.

> Passive reports can go to any node; a simple load balancer will work fine without any form of hashing or federation required.

How do you re-combine and alert on data for one service that got reported to multiple nodes? This would imply to me a database of some form, which is going to need hashing or federation or other distributed systems approaches to be scaled out.

> Aside from the additional processing requirements

Push or pull, there's additional processing requirements when you scale. It's the same bytes on the wire and broadly the same amount of processing power required.

> you are also limited in that a polling process must be told in advance of new systems or services

That's not a scaling limit, that's a more fundamental issue that isn't different between push and pull.

For a push system you need to have a list of all systems and services in order to be able to alert on systems that never reported, or are no longer reporting.

A more thorough investigation of pull vs. push.

https://www.circonus.com/pully-mcpushface/

Not a terribly thorough investigation; simply a series of unsubstantiated assertions.

Pull works fine at 2 million machines" is a great statement to make, but it would be much stronger with more details. How many machines are doing the pulling? How often? Are they using subprocesses or threads or greenthreads? How do they handle timeouts? How many metrics per machine? How many pulls per metric grab?

I want to understand more about why you think that pull doesn't scale. Borgmon at Google (the biggest scale ever) worked fine with a pull model, and as far as I know, the successor still pulls, too. A push model also has the problem that now the identity of each instance needs to be known by each instance itself, instead of only by the monitoring system via service discovery (which needs to know about what instances should exist and their identity anyways, otherwise how is it going to let you know that something is wrong?).

We also have an FAQ in Prometheus about why we prefer pull: https://prometheus.io/docs/introduction/faq/#why-do-you-pull...?

In my experience, pulling is operationally much nicer than pushing, and I've worked with both. It also gives you somewhat less of an accidental DDoS exposure.

> but I won't use Prometheus, because of the active polling model.

> [Grafana+Ichinga] they're so rock solid (and scale like mad) I have a hard time not recommending them.

As a Prometheus developer I have seen a significant number of users who moved from Graphite because they found it doesn't scale and was far from rock solid for them, requiring regular manual care and feeding. By contrast Prometheus seems to be working pretty well for them at what we would consider to be a moderate load. I've heard similar about Nagios/Ichinga.

Push vs. pull is largely not relevant for scaling (pull is slightly better in this regard, but only slightly). I've been involved with some extremely large scale monitoring systems, and the fact they were pull was never relevant to scaling them.

May I ask what you consider to be a high level of scale?

> It won't scale without a number of workarounds.

There are very very few systems who won't scale without workarounds. That's the nature of scaling a non-trivial system.

What do you have to monitor? For network hardware you can use Observium (or the fork LibreNMS). It's simple and work fine.
Yeah, should have made it more clear. Monitoring a linux-based application cluster of a couple thousand machines.
Kentik (www.kentik.com) is a great choice for monitoring network traffic details. Terabit-scale aggregates down to individual conversations. (Disclaimer: I work at Kentik)
It depends on your needs and budget.

Can you afford time but not money? Try Sensu or Nagios.

Do you have money and not time? Try datadog.

Like someone else mentioned here, if you're looking to alert off of logs from ELK, try Elastalert.

Agree with this.

If you have money and no time: DataDog

If you don't mind putting in a little time: Sensu

Sensu is straightforward to deploy if you use Chef/Ansible/Puppet. It also supports running Nagios plugins which is pretty useful.

Datadog does WAY more than Sensu does. Sensu doesn't handle metrics with more than 1 dimension, which should be a standard feature of any modern metrics platform.

I also disagree that setting up Sensu takes a "little" time. What is a "little" to an inexperienced Sensu administrator? A day? A week? Several weeks? Quantifying it would be valuable to the reader.

If you can have a monitoring system in the cloud Datadog is a great choice.

Good documentation, UI, many, many plugins and fair pricing (IMO).

https://www.datadoghq.com/

(Im not affiliated with in any way other than using their product on a pet project with many moving parts).

Datadog was down so often when I had to use it. It felt so unreliable. We used to monitor hosts and it got to the point where checking if datadog was down was part of troubleshooting..
How long ago was that? We just switched in January and it's been pretty reliable.

As far as Datadog goes, it's the most team friendly dashboard system we've used. We had a specialty monitoring system for one application stack previously, and no one made custom dashboards there or even just looked at the data. Now we've got custom dashboards out the nose and we're gradually consolidating to a "best of" dashboard for each service.

Datadog may be okay if you're doing really simple stuff and not sending much data. Once you get to scale, you will need a system like Wavefront. Wavefront can take millions of data points per second, query on them super fast, and they don't go down. Every other monitoring system downsamples, or throws away your data after a certain amount of time.
We throw hundreds of thousands of metrics at Datadog per minute from thousands of hosts; it hasn't broken a sweat yet.

Are you affiliated with Wavefront?

I'm a happy customer of Wavefront. I completely believe that Datadog can handle hundreds of thousands per minute -- especially if most of them are pre-canned, non-custom metrics grabbed by their agent. Hundreds of thousands of metrics/minute is a few thousand a second only. Wavefront does millions of custom metrics per second, which can be sent with different dimensions and tags. That's much harder.
You misspelled marketingman.
Yeah I second this. Hundreds of thousands per minute is a very small number. Wavefront can go over a million per second.
Per tenant, or globally? And does it have an SLA around this?

(I've learned not to trust numbers that seem too good to be true unless they're contractually obligated.)

Prometheus can do 800k/s on a single machine. Handling a million per second sounds perfectly plausible to me if you design it properly. The question is more how much it's going to cost you.

Wavefront doesn't publish pricing, but if we take Librato's pricing as a general indication you're talking several million dollars a month.

The ui is pretty nice for sure, especially compared to some other things im using.

I used it up until two months ago when I left that job. There was 2000~ servers monitored I think.

Just make sure you understand their pricing (I didn't): http://sagemath.blogspot.com/2016/07/datadogs-pricing-dont-m...
How could their pricing page be clearer? It says per host in fairly large letters underneath it.

I'm asking because I will be designing a similar page soon (that's also billed per host) and I'd like to avoid the same mistakes.

[EDIT: This pricing page by the top poster in this thread is way better than I suggest below -- https://www.serverdensity.com/pricing/]

1. VERY clearly state that when you sign up for the service, then you are on the hook for up to $18*500 = $9000 + tax in charges for any month. Even Google compute engine (and Amazon) don't create such a trap, and have a clear explicit quota increase process.

2. Instead of "HUGE $15" newline "(small light) per host", put "HUGE $18 per host" all on the same line. It would easily fit. I don't even know how the $15/host datadog discount could ever really work, given that the number of hosts might constantly change and there is no prepayment.

3. Inform users clearly in the UI at any time how much they are going to owe for that month (so far), rather than surprising them at the end. Again, Google Cloud Platform has a very clear running total in their billing section, and any time you create a new VM it gives the exact amount that VM will cost per month.

4. If one works with a team, 3 is especially important. The reason that I had monitors on 50+ machines is that another person working on the project, who never looked at pricing or anything, just thought -- he I'll just set this up everywhere. He had no idea there was a per-machine fee.

No offense there but it's very clear that the pricing is per host per month and it's a common practice in the industry.

Thinking you could get away with your current setup for $15 is very naive of you. It looks like you red it well but your refused to acknowledge it?

FYI prices for some popular services:

- BMC (direct competitor to datadog) is $12 per host per month

- SignalFx (other competitor) is using a $ price per metric stream per month (this one is tricky but they suggest to plan for $12 per host per month)

- NewRelic is $75 per host per month

- Dynatrace/Appdynamics are about $1000 per host per month

- AWS/GCE have pricing per hour (which is annoying to convert per month)

I agree on one thing though (and I did tell that to datadog guys directly). The price displayed in big should be $18 per month per host and not $15. The cheaper one if for an annual subscription which is not the most common case.

I've used Nagios and Icinga2, and I've become a huge proponent of check_mk. The documentation isn't great, but the product rocks: with very little time, you can start monitoring a slew of services (disk, hardware, logs, ntp) with almost no tweaking required. You can easily create custom checks, but you also have all the Nagios plug-ins it's compatible with. No daemon listens on the hosts being monitored. You get graphing for free (no setup time) for almost all your checks.

It uses Nagios under the hood, it's basically an automation system that generates those Nagios systems. The GUI is amazing, because it uses a plug-in so you don't have to edit files on disk to group your hosts or tweak the alerts. Those configs are snapshotted automatically at every change, and you can replicate that configuration automatically to remote servers. Download it from the upstream site instead of relying on distro package repositories.

Caveat, the documentation sucks, the GUI can be nonintuitive and it's hard to Google problems. It takes time to fully tune. Out of the box you'll probably still be impressed though.

Yes, check_mk is great. I rolled out a 30000+ checks installation on a single server today. I've looked at most monitoring products on the market and check_mk easily wins. It's really popular in Germany, many huge companies are using it.

The English documentation isn't that great, the German one is better. That being said, it's mostly self-explanatory and all checks are very well documented in man pages.

My favorite features:

- Auto discovery for literally everything, including SNMP interfaces.

- Fine grained rule system for customizing check threshold and parameters

- All configuration is automatically versioned and you can integrate it with Git - this includes the changes you make in the web interface.

- It's very easy to set up a distributed monitoring system (multisite) with a central node which aggregates all states and replicated configuration changes, yet each site is fully autonomous.

- The agent takes zero network input, so no attack surface.

- Even though it's extremely featureful, it's architecture is very simple and it's easy to contribute code and write custom checks.

Their Git is public: http://git.mathias-kettner.de/git/?p=check_mk.git;a=shortlog...

It works well with Naemon and Nagios 4. Been using it for a number of projects, ask me anything!

Monitoring systems not to use:

  - Shinken (zero security awareness and dishonest PR, when I tried it, it has so many bugs that I wouldn't ever trust it to keep my data safe)

  - Zabbix (it has some brilliant features, but the architecture is a mess, configuration and time series stored in a MySQL database which is hard to manage and automate, I found it cumbersome to debug, written in PHP)
The one you use. I have sold and implemented these types of tools for the past ten years. Biggest problem is companies not actually fully implementing and using the tools they already own, and letting teams splinter off into their own tool sets.
We have had very good success with sensu. We like it better than nagios, but I haven't used many others so can't really say that sensu is better than everything.
I'm a big fan of Zabbix for general server monitoring and alerting. Sensible defaults, built in graphing, multi-step web scenarios. Good times.
I was a big fan but have migrated away to graphite+grafana, though it depends on your needs.
Best at what? What is driving you to want to switch?

I like Icinga a lot. I won't bother reviewing it; is is very well known. Professionally, my last two gigs have used Zabbix.

Zabbix, architecturally, is a nightmare. Uses an RDBMS for storing time-series data, so it wastes a ton of space on historic data while managing to be far slower than it needs to be when querying larger ranges. Uses an agent. Has a proxy-agent that, while handy, encourages all sorts of sketchy, error-prone monitoring topologies. With 3.0, the UI has crawled out of the awful range, and is now merely annoying. Takes the all-singing, all-dancing monolithic approach for the main app, including features for drawing maps on big-screens.

For all that, it works well. Give it the hardware it wants, be sane in setting it up[1], ignore the goofy features (maps, inventory, screens - I guess someone must of requested those), and it is very solid and very powerful.

[1] The template system, pseudo-language for triggers, naming convention for variables and method of creating custom monitors take some getting used to. Expect to take the time to actually read the docs, and most likely to throw out your templates the first time you model your systems.

Prometheus is absolutely the way you should be going. All of the other systems I'm seeing mentioned here — Nagios, Icinga, check_mk, Zabbix, Sensu — are host-centric and are very awkward when you try to bend them to fit modern (containerized, etc.) workloads.
There's always a server. Regardless of how far away you've abstracted it away, there's always a server which should probably be monitored (even if to know when it's about to fail and should have work shunted off it prior to its failure). Icinga and others make it easy to programmatically add and remove servers as they enter and leave your environment.

Even if you don't have access to the server so you can monitor it, you can use the "host" concept as containers for your services: "api.mycorp.com", "tasks.mycorp.com", "backups.mycorp.com" are great starting points.

> There's always a server.

Actually, no.

When you monitor state of a cluster (e.g. node count), you don't have a server, you have plenty of servers and a cluster (completely different thing).

When you monitor temperature in your server room, you don't have a server, you have a server room.

When you monitor exchange rate, you don't have a server.

When you monitor a website, you still don't have a server.

And now add all the AWS Lambdas and other serverless rage.

Notion that everything works on a (single!) server was never valid, and today it's even more visible than it was twenty years ago, when Nagios was state of the art.

True but in practice it doesn't really matter. With sensu, you have offbox checks, and you just pick some internal server (there's always some "misc" server hanging around).

What matters is that the alert about the issue is raised and relayed to the proper notification channels. Since sensu doesn't concern itself with a fancy dashboard, it doesn't really matter if the alert pertains to the host or not.

Any decent monitoring will have customized the alert handling based on what's alerting, so there's some amount of post-processing possible.

> True but in practice it doesn't really matter.

In practice it doesn't matter if you name a file handle "juju" and a database query "peach" in your code.

It's a matter of calling things what they are instead of forcing them into a mismatched data scheme by creating artificial hosts.

Yeah, containerization is a good point. We've been starting to deploy apps on Docker within the last 6 months. What does Prometheus offer that makes it better for containerization?
Mostly, it has great support for service discovery for many major cloud and container platforms (Kubernetes, Marathon, EC2, Azure, Zookeeper, Consul, ...). So it can not only go out and pull metrics data directly from instances as they float around your dynamic cluster scheduler, but also attach identity metadata (as provided by the service discovery) to the time series collected from each instance. For example, you may map EC2 tags or Kubernetes labels into your Prometheus time series labels to give you more useful metrics. There's also a way to plug in your own custom service discovery. Also, Kubernetes exports native Prometheus metrics since quite a while already.

Borg inspired Kubernetes. Borgmon inspired Prometheus. So naturally it works well together with a dynamically scheduled world.

It depends on your architecture and scale. There is no "best", just "best we've found for this" and "best given other constraints".

This is yet another point where DevOps is not "devs doing ops" but "operations building and deploying with all the tools of modern software development". You need a subject matter expert.

What are you monitoring? Do you care about availability or performance or both? Scale? Do you have services or servers? Do you manage the underlying hardware? Do you need to track which hardware boxes have which VMs or containers?

There are a million questions to answer. One big set of them: what do you dislike about Nagios? Make sure that you don't get those problems with the next one, but also make sure you get something that does what you need as well as what you want.

Thanks for the comprehensive reply. Briefly I would say that we care about availability more than performance, though both are important. We're running somewhere on the order of 2000 VMs w/ ESX with some bare metal systems running database clusters. We have a separate team that manages the hardware infrastructure and they have their own monitoring and alerting system. I'm mostly concerned about preventing downtime for the application cluster, alerting the right people via the right means (chat, email, pagerduty) when something does go down, and getting some high resolution graphs for analysis.
I still don't know anything much about your systems, but I do know this: find out what your hardware team uses and see if it is right for you, too. (Or find out that they are unhappy with it, and perhaps go in together on a new system.)

Benefits: shared expertise. Common language. Propagation of alerts up from hardware and down from services. Better root cause analysis. If you have a good culture, faster resolution time and better understanding.

> You need a subject matter expert

Spot on. Too many people think that monitoring is about slapping a piece of code on some hosts. Monitoring is data science.

At Stack Overflow we use a homebuilt Go solution called bosun: http://bosun.org/ -- it runs on pretty much anything and lets us incorporate data from windows machines / linux machines in one place.
I recently tried out Bosun and liked it a lot. The documentation is a little light, and the dependency on hbase and hadoop (since opentsdb uses that) is a bit of a pain. Maintaining those isn't particularly straight forward or fun.

I'm also interested in prometheus but haven't gotten to try it out yet. Anyone reading this have experience with both? How do they compare?

We've been dogfooding the new Stack Overflow Documentation system for Bosun, so you may find some better examples at http://stackoverflow.com/documentation/bosun/topics which just opened yesterday. If you see anything missing you can request a topic or flag an example as needs improvement.
Just use Prometheus, nothing else comes close to it. It also just hit 1.0

EDIT

Should have mentioned how well it pairs with Grafana ;)

It depends on what you want to achieve, but Nagios works well and Graphite for trending is also quite useful.
We've been using riemann and it's wonderful. There's a little bit of learning curve as the configurations are just clojure code, but since it's all code you can build whatever you want on top of it if you know some Clojure. The DSL is well thought of and we ended up writing a REST API on top of riemann to make our monitoring stack self-serviced for all the internal users.
AppSignal is also a cool product, although mostly focused on Rails applications. And, a big plus, they are working on an Elixir integration :-) https://appsignal.com/elixir
Prometheus.io which is a modern fresh monitoring system that I would checkout if replacing a legacy system.

Also take a look at Riemann which is system monitoring written in Clojure. Riemann should be good for monitoring latency of the system.

If it helps here is Slidedeck from Spotify how they do their monitoring https://www.netways.de/fileadmin/images/Events_Trainings/Eve...

Riemann is a generic event processor. You can use it to generate alerts or aggregate metrics, but you still need something like collectd or telegraf to collect system/app stats from each machine and send it to Riemann.
Riemann comes with collection clients as well
I can only second Prometheus. It's modeled after Google Borgmon (and possibly Monarch) and excels in any flexible workload. Really great piece of engineering.
It should be noted that Riemann is different from Nagios and Prometheus in that it's push-based. The other two are primarily pull-based.
Yep, I think that is Riemann's greatest advantage. I don't like the fact that with Prometheus I have to set up some sort of service discovery mechanism. Right now we're using Foreman to manage our clusters, so most likely I would have to use the file service discovery type and query the Foreman API to produce a YAML or JSON file to provide a list of static hosts.
If your monitoring system doesn't have knowledge of what's supposed to be out there (like via service discovery), how do you know when something is broken/down/missing?
Riemann injects expire events into the event stream when it doesn't hear from a service for a while. Each event has a TTL that it uses to figure this out. Then of course you can alert on the expired events or take other actions.
How does this tell you that something is missing if it never reported, or that something is no longer meant to exist?
It's true, you can't tell if something is missing if it never reported. I guess it depends on your requirements. In a situation where your workloads are ephemeral you may not care as much if all of your services have reported as long as most have. In the case that something should no longer exist you could write that functionality into your Riemann configuration. As an example, I could write a "dead service" stream processor that is used to inform Riemann that a service should no longer exist. When a "dead service" event is injected into the event stream for a particular service, Riemann will note the dead service and ignore future events from it.
I like Riemann and actually read The Art of Monitoring (https://artofmonitoring.com/) which was a great book. There are two big downsides for me on this one. First, you MUST build your monitoring solution from scratch and you MUST learn Clojure (which can be hard to get a whole team to agree to). Second, there's no alerting dashboard, which makes it difficult to see the overall state of the clusters you're dealing with. The only way you know there's a problem if you get an email. Maybe there's a better way to handle that but I wasn't able to find one.
You can alert via a number of mechanisms: email, PagerDuty, Slack et al, etc (I talk about most of those in Chapter 9).

I have never been very keen on alerting dashboards, I find they are rarely actually reviewed and flash red for days or weeks. :) So I only covered metrics/graphing as a console rather than a status console. If you want to add such a console it'd be easy to output Riemann events via an API to such a console.

Glad you enjoyed the book!

> you MUST learn Clojure (which can be hard to get a whole team to agree to)

For any sufficiently advanced monitoring system, you're going to have to learn some form of DSL/language to take advantage of it.

I wouldn't consider this to be a major issue, more part of the irreducible complexity of the problem. The Riemann examples I've seen all seemed pretty readable, and routing alerts is not world away from what you'd be doing in say a Prometheus Alertmanager config; just with S-Expressions against YAML.

It's a major issue for me because of the time investment required to learn the language (functional programming isn't exactly second nature to most programmers) and the need to design the monitoring system from scratch. Instead of an out-of-the-box system you're getting more of a framework which allows you to build one. I actually like Clojure and agree that it is readable as well as fun to learn. But I think with something like Prometheus you do more simple configuration than monitoring system design.