News for hackers. Stuff that matters.
Re:Simple Alerting for the ELK Stack by chrissnell on Sunday April 24, 2016 @03:35PM (#11561000)
We're using this. We're not running the full ELK stack; rather, we've replaced Logstash with fluentd. Our devs have two choices for acting on their logs: they can use elastalert (running in Kubernetes) to alert on events that are recorded in Elasticsearch. We've provided a sample elastalert template that can be easily customized to a developers needs.

They can also deploy a custom fluentd parser/transformer in Kubernetes. To make this work, they apply a special label in their Kubernetes replication controller that specifies the name of the custom fluentd parser service. The primary fluentd service pulls the logs from Docker and when it detects this label for a particular log entry, it routes that entry to the custom parser service. This allows us to have a standard log pipeline that works out-of-the-box for most projects but also self-serve custom parsing for the apps that need it.

Re:Simple Alerting for the ELK Stack by sciurus on Sunday April 24, 2016 @04:17PM (#11561182)
Stack Exchange's monitoring system, Bosun (https://bosun.org/), also has support for alerting on the results on Elasticsearch queries.
Re:Simple Alerting for the ELK Stack by otterley on Sunday April 24, 2016 @04:53PM (#11561335)
It sounds like they're using a search engine as a substitute for a proper CEP/ESP like Apache Flink. Was the latter considered? I'm rather curious as to why they chose a search engine instead.
Re:Simple Alerting for the ELK Stack by twic on Sunday April 24, 2016 @06:20PM (#11561633)
ELK is a very standard stack for collecting and disseminating logs. It's a fairly natural, and i think sensible, step to build a pattern-based alerting tool as a bag on the side of ELK.

If you were going to do it more properly, the first choice would probably be Riemann, which has already seen some adoption in this role. There are already plugins on both sides to forward events to the other:

https://www.elastic.co/guide/en/logstash/current/plugins-out...

http://riemann.io/api/riemann.logstash.html

Re:Simple Alerting for the ELK Stack by otterley on Sunday April 24, 2016 @08:10PM (#11561920)
With all respect to the very smart author of Riemann, as a practical matter, its use of Clojure is simply not a hurdle most SRE types are going to overcome to use it.

ElasticSearch is a great search engine. It's not a CEP or SEP. I don't mean to discourage its use, but for this purpose it's not a good fit. It does make sense to tee incoming logs to both as they suit different purposes, but I'd delegate pattern analysis to the latter.

Re:Simple Alerting for the ELK Stack by zenlikethat on Monday April 25, 2016 @12:13AM (#11562492)
Using Clojure, especially to slap together Riemann configs, is really not an insurmountable obstacle, especially when something as useful as Riemann is on the line. The more the self-defeating attitude that "Clojure's too hard" propagates the less likely people will be to even try. Most SRE's are pretty smart, I believe in them.
Re:Simple Alerting for the ELK Stack by otterley on Monday April 25, 2016 @04:01PM (#11566885)
There are some great commercial options in this space like SignalFX and Sumo Logic. The cost of Riemann's learning and implementation challenges would have to be made significantly less for entire teams to make it a viable alternative to those, in my experience.

If anyone runs a team of 25 or more SREs and effectively uses Riemann (and there's more than 3 domain experts), and is not otherwise a Clojure shop, I'd love to hear from you.

Re:Simple Alerting for the ELK Stack by twic on Monday April 25, 2016 @03:44AM (#11562972)
> as a practical matter, its use of Clojure is simply not a hurdle most SRE types are going to overcome to use it

And yet, it's the most widely used option in this role. Crazy days.

Re:Simple Alerting for the ELK Stack by bogomipz on Monday April 25, 2016 @01:39PM (#11565857)
Can you site something specific for this claim? Are you talking about clojure or riemann or both?
Re:Simple Alerting for the ELK Stack by bogomipz on Sunday April 24, 2016 @10:20PM (#11562270)
SEP? I know CEP. Riemann is great but I think you are right, there's a lot of people who aren't willing to pick up some clojure for whatever reason.
Re:Simple Alerting for the ELK Stack by be_erik on Sunday April 24, 2016 @01:14PM (#11560449)
Is anyone running this in production and care to share their experiences? This seems to be a pretty good replacement for Splunk's alerting mechanisms in the ELK stack, which has always been one of the parts I miss the most.
Re:Simple Alerting for the ELK Stack by sciurus on Sunday April 24, 2016 @01:51PM (#11560606)
FWIW the company behind Elasticsearch is happy to sell you a solution for that: https://www.elastic.co/products/watcher
Re:Simple Alerting for the ELK Stack by tzakrajs on Sunday April 24, 2016 @02:14PM (#11560678)
I am using it right now in production. It's worst trait is that it is not clustered and does not share state about what alerts have been sent already. This means you can have no more than one agent running without having duplication of alerts. This also complicates high-availability for obvious reasons.
Re:Simple Alerting for the ELK Stack by tzakrajs on Tuesday April 26, 2016 @02:09PM (#11574237)
(Correction/Public Shaming: Its)
Re:Simple Alerting for the ELK Stack by yahyaheee on Sunday April 24, 2016 @09:04PM (#11562048)
My biggest issue with this was that it is purely event driven. So what if your trying to alert on no event? They had no answer for that
Re:Simple Alerting for the ELK Stack by bogomipz on Sunday April 24, 2016 @10:22PM (#11562273)
Right. This is something you can get quite easily using Riemann.
Re:Simple Alerting for the ELK Stack by ApsOps on Sunday April 24, 2016 @01:19PM (#11560471)
I have been running this. It works well. I also wrote some custom code to send the stack-traces, if we get any, to a slack channel.
Re:Simple Alerting for the ELK Stack by be_erik on Sunday April 24, 2016 @01:50PM (#11560600)
That sounds fantastic. Do you have an example of how you extracted the trace? Was it simple to extend ElastAlert or did you have to fork it to add that kind of option?
Re:Simple Alerting for the ELK Stack by ApsOps on Sunday April 24, 2016 @03:54PM (#11561075)
The trace is basically extracted using Logstash's multiline filter. It adds a tag "stacktrace" to the log entry.

I just made a few changes in SlackAlerter class to customize for my use-case. I'd try to clean-up and send a PR soon.

Re:Simple Alerting for the ELK Stack by yahyaheee on Sunday April 24, 2016 @09:05PM (#11562053)
It's a nice product, just be aware that it is purely event driven. So if you are trying to alert on no event then things get messy
Re:Simple Alerting for the ELK Stack by Liuser on Monday April 25, 2016 @03:20PM (#11566609)
Unless I'm misunderstanding your comment, isn't that a flatline type of alert, which is supported by Elastalert?
Re:Simple Alerting for the ELK Stack by yahyaheee on Monday April 25, 2016 @03:29PM (#11566676)
No that is just if a value drops off, but that rule will never fire unless an event occurs in elasticsearch matching that query. I found this out the hard way
Re:Simple Alerting for the ELK Stack by jonaf on Sunday April 24, 2016 @01:51PM (#11560607)
How does this compare with the log stash alerting plugin that's available? Does it work without log stash (i.e., just elastic search)?
Re:Simple Alerting for the ELK Stack by be_erik on Sunday April 24, 2016 @02:10PM (#11560668)
It works against elasticsearch and is somewhat agnostic as to how those documents got there in the first place. I've been playing with it as part of an EFK (fluentd instead of logstash) install.
Re:Simple Alerting for the ELK Stack by snorremd on Sunday April 24, 2016 @03:31PM (#11560984)
Do you have a link to the logstash alerting plugin? I'm not familiar with it and I'm interested in alert tools for the elk (and beats) stack.
Re:Simple Alerting for the ELK Stack by bogomipz on Sunday April 24, 2016 @10:24PM (#11562277)
Are you referring to watcher? That's a paid product I believe no?