Fluentd + fluent-plugin-geoip
- Fluentd(td-agent3)とfluent-plugin-geoipを使ってnginxのログのipから位置情報を取得しようとしているのですが以下のエラーでfluentdが
geoip
を読み込みません
- ローカルにはちゃんとプラグインが入ってると思うのですが…
2019-04-23 17:24:09 +0900 [error]: config error file="/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="Unknown output plugin 'geoip'. Run 'gem search -rd fluent-plugin' to find plugins"
その他
pluginのインスト方法
sudo td-agent-gem install fluent-plugin-geoip
インストール済みプラグインの確認
td-agent-gem search -rld fluent-plugin
- 結果
fluent-plugin-geoip (1.3.1) Author: Kentaro Yoshida Homepage: https://github.com/y-ken/fluent-plugin-geoip License: Apache-2.0 Installed at: /opt/td-agent/embedded/lib/ruby/gems/2.4.0 Fluentd Filter plugin to add information about geographical location of IP addresses with Maxmind GeoIP databases.
fluentdの設定
<match raw.nginx.access.log> @type geoip geoip_lookup_key remote_addr <record> country ${country_code['remote_addr']} location ${latitude['remote_addr']},${longitude['remote_addr']} </record> remove_tag_prefix raw. </match>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。