Logstash cheat sheet: Difference between revisions

Line 449: Line 449:
mapping type "geo_point" の型(変換)が 2.2.x と変わっている感じでエラー
mapping type "geo_point" の型(変換)が 2.2.x と変わっている感じでエラー


<syntaxhighlight lang="javascript" enclose="div">
          mutate { remove_field => [ "[postfix_geoip][location]" ] }
          mutate { add_field    => { "[postfix_geoip][location]"        => "%{[postfix_geoip][longitude]}" } }
          mutate { add_field    => { "[postfix_geoip][location]"        => "%{[postfix_geoip][latitude]}" } }
</syntaxhighlight>
ちなみに 5.0 版になっているらしくって注意。
  [https://github.com/logstash-plugins/logstash-output-elasticsearch/commit/4abd353ff7b058f8142fe2d4ee2dd06408d0aab1 Fix template for 5.0]
  [https://github.com/logstash-plugins/logstash-output-elasticsearch/commit/4abd353ff7b058f8142fe2d4ee2dd06408d0aab1 Fix template for 5.0]