Macklog
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
- Fork it ( https://github.com/[my-github-username]/macklog/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request