Cloud

fluent-plugin-extract_query_params

'김용환' 2017. 8. 23. 16:34


fluentd에서 http query의 모든 매개변수 값을 key,value로 포함시키려면 


fluent-plugin-extract_query_params를 설치하고 @type extract_query_params를 활용한다. 




참고 

https://github.com/kentaro/fluent-plugin-extract_query_params


Imagin you have a config as below:

<filter test.**>
  @type extract_query_params

  key            url
  only           foo, baz
</match>

And you feed such a value into fluentd:

"test" => {
  "url" => "http://example.com/?foo=bar&baz=qux&hoge=fuga"
}

Then you'll get re-emmited tag/record-s below:

"extracted.test" => {
  "url" => "http://example.com/?foo=bar&baz=qux&hoge=fuga"
  "foo" => "bar",
  "baz" => "qux"
}