Rails Sidekiq 异常的监控

xiaoronglv · April 25, 2014 · Last by yedingding replied at April 26, 2014 · 6206 hits

工作中遇到一个问题,请大家指点一下思路。

问题

一个 App 部署在多台云主机上,每台机器都在执行异步任务,所以 sidekiq 的 log 分散在各个机器上。

每当异步任务执行出现异常时,我要去各个机器的 log 中去捞异常,十分麻烦。

我在想:可否搭建个服务把他们都汇总到一个地方?

sidekiq 的官方推荐

查看了 sidekiq 的官方日志,作者建议采用付费的服务

Use an error service - Honeybadger, Airbrake, Rollbar, BugSnag, Sentry, Exceptiontrap, etc. They're all similar in feature sets and pricing but pick one and use it. All should have Sidekiq support built-in. The error service will send you an email every time there is an exception in a job.

但是 Honeybadger, Airbrake, Rollbar, BugSnag, Sentry, Exceptiontrap 都是国外的服务,网络连接不稳定

所以想请教一下大家,大家是怎么搭建 sidekiq error service 的?有哪些因素需要考虑?

谢谢大家。

有个插件可以把错误记录在 redis 里,就像 resque 一样。这样就在 sidekiq 后台里看到了: https://github.com/mhfs/sidekiq-failures

我们也是用 Exception notification

汇总 log 到一个地方有很多做法,比如 syslog-ng, fluentd 等

You need to Sign in before reply, if you don't have an account, please Sign up first.