Macklog

Build Status

Code Climate

mackerelのログ監視プラグインです。 指定したファイルに指定したワードが出力された場合、アラートを出力します。

Installation

gem install macklog

Usage

mackerel-agent.conf

[plugin.checks.http_fatal_error]
command = "macklog -f /var/log/httpd/error.log -w fatal -i"

options

-f : 

同じアラートを複数回通知しないために、履歴を/tmpディレクトリ配下のファイルで行っています。 /tmp以外で行う場合は、export MACKLOG_TMP=/var/tmpのように環境変数に指定を行って下さい。

Contributing

  1. Fork it ( https://github.com/[my-github-username]/macklog/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request