Kouhei Sutou
null+****@clear*****
Fri Jan 22 17:53:04 JST 2016
Kouhei Sutou 2016-01-22 17:53:04 +0900 (Fri, 22 Jan 2016) New Revision: 311fc2729ce7a960240f1f2e1ab1ae750eb0eda6 https://github.com/groonga/fluent-plugin-groonga-query-log/commit/311fc2729ce7a960240f1f2e1ab1ae750eb0eda6 Message: Add a sample for storing slow queries Added files: sample/store-slow-query.conf Added: sample/store-slow-query.conf (+39 -0) 100644 =================================================================== --- /dev/null +++ sample/store-slow-query.conf 2016-01-22 17:53:04 +0900 (90c0963) @@ -0,0 +1,39 @@ +<source> + @type tail + path "#{ENV['GROONGA_QUERY_LOG_PATH'] || '/var/log/groonga/query.log'}" + pos_file /var/log/fluentd/groonga-query-log.pos + read_from_head "#{ENV['GROONGA_QUERY_LOG_READ_FROM_HEAD'] || 'false'}" + tag groonga.query + format none +</source> + +<filter groonga.query> + @type groonga_query_log +</filter> + +<filter groonga.query> + @type grep + regexp1 slow \Atrue\z +</filter> + +<filter groonga.query> + @type record_transformer + enable_ruby true + renew_record true + keep_keys elapsed + <record> + record ${JSON.generate(to_h)} + </record> +</filter> + +<match groonga.query> + @type groonga + store_table SlowQueries + + protocol http + host 127.0.0.1 + + buffer_type file + buffer_path /var/lib/fluentd/groonga.buffer + flush_interval 1 +</match> -------------- next part -------------- HTML����������������������������...ダウンロード