在Elastisearch中实现电子邮件警报的最佳方式是什么? [英] What is the best way to implement Email Alerts in Elastisearch?

查看:168
本文介绍了在Elastisearch中实现电子邮件警报的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将在AWS建立一个新的招聘板类型的网站,我们正在使用Elastisearch进行所有的工作和候选人搜索功能。



该网站将电子邮件提醒
1)候选人可以设置一个警报,以便发布匹配某些关键字并且在特定邮政编码的X英里内的新作业将通过电子邮件发送给他们。
2)招聘人员将能够设置警报,以便在特定邮政编码的X英里内的某些关键字的简历将通过电子邮件发送给他们



是否有开源代码可以让我们开始吗?



我已经看过Elastic.co的Watcher,但是我们正在尝试寻找一个低成本的解决方案。有人建立了一个可扩展的Web应用程序,可以使用Watcher来处理每天数千个警报的10个数据。或其他一些警报工具?



Thx,



Brent Byers

解决方案

如果您不想使用Watcher(还)),下一个可用选项是挖掘 percolate API (+ 关于该主题的旧博客文章),以便实施观察部分并处理您自己的代码中的警报部分。



有些人正在做的一些例子:


  1. 您可能需要检查 ElastAlert ,这应该可以让你走。


  2. Toplog使用 percolate API,以便在索引特定日志模式时获取警报。他们还创建了 percolator Logstash output ,以便在索引之后渗透文档,并将匹配的percolated查询存储到redis(或者你有什么)。一些Logstash人员已经拥有相同的想法,可能会将该插件视为可行的选项。


  3. 有一个另一个例子,每当新产品被索引时与发送的查询相匹配,都会发送电子邮件。


如果你再多挖一点,你一定会找到更多的例子。但总体上的想法总是一样的:


  1. 使用percolate API存储工作/候选查询

  2. 渗透新工作/候选人文件

  3. 如果在步骤2中找到匹配的查询,请发送警报。



最后,Kibana有一个开放的问题,可以集成警报系统,您可能会也想观看。



更新(2016/05/04)



我决定创建一个支持ES Percolate API的Logstash过滤器。这与Toplog家伙做的类似,但它作为一个过滤器运行,丰富了事件,而不是作为redis的输出运行。



您可以在: https://github.com/elastic/logstash/issues/2187#issuecomment- 216760668


We will be building a new job board type site that runs in AWS and we are using Elastisearch for all the job and candidate search functionality.

The site will have email alerts. 1) Candidates can set an alert so that a new job that is posted that matches certain keywords and is within X miles of a certain zipcode will be emailed to them. 2) Recruiters will be able to set alerts so that a resume with certain keywords within X miles of a certain zipcode will be emailed to them

Is there opensource code that will get us started?

I have read a bit on Watcher by Elastic.co but we are bootstrapping and trying to find a low cost solution. I will ping Elastic to get a feel for their up front costs...

Has anyone built a scalable web application that can handle 10's of thousands of alerts per day using Watcher or some other Alerting Tool?

Thx,

Brent Byers

解决方案

If you don't want to use Watcher (yet), the next available option is to dig into the percolate API (+ older blog post on the subject) in order to implement the "watch" part and handle the "alert" part in your own code.

Some examples of what people out there are doing:

  1. You might want to check ElastAlert created by Yelp and which should probably get you going.

  2. Toplog uses the percolate API in order to get alerts when specific log patterns are being index. They've also created the percolator Logstash output in order to percolate a document just after it's been indexed and store the matching percolated queries into redis (or what have you). Some Logstash folks have had the same idea and might be considreing that plugin as a viable option.

  3. There's another example where an email is sent whenever a new product is being indexed which matches a given query.

If you dig a little more, you'll certainly find plenty more examples. But the overall idea is always the same:

  1. Store job/candidate queries using the percolate API
  2. Percolate new job/candidates documents
  3. If matching queries are found in step 2, send alerts.

Finally, there's an open issue in Kibana for integrating an alerting system that you might also want to watch.

UPDATE (2016/05/04)

I've decided to create a Logstash filter that supports the ES Percolate API. It is similar to what the Toplog guys do, but it runs as a filter to enrich the event instead of running as an output to redis.

You can find more info at: https://github.com/elastic/logstash/issues/2187#issuecomment-216760668

这篇关于在Elastisearch中实现电子邮件警报的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆