Created
April 12, 2014 08:26
-
-
Save yosisa/10524595 to your computer and use it in GitHub Desktop.
Elasticsearch の index templates で解析方法を指定する(または、default mapping が効かない時に) ref: http://qiita.com/yosisa/items/b0bb44548bbd527005cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"template": "accesslog-*", | |
"mappings": { | |
"fluent": { | |
"properties": { | |
"host": { | |
"type": "string", | |
"index": "not_analyzed" | |
}, | |
"uri": { | |
"type": "string", | |
"index": "not_analyzed" | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<match pyfluent.**> | |
type elasticsearch | |
host localhost | |
port 9200 | |
logstash_format true | |
logstash_prefix accesslog | |
type_name fluent | |
include_tag_key true | |
tag_key @tag | |
flush_interval 5s | |
</match> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"host": "127.0.0.1", "uri": "/users/1", "method": "GET", ...} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"accesslog": { | |
"template": "accesslog-*", | |
"mappings": { | |
"fluent": { | |
"properties": { | |
"host": { | |
"type": "string", | |
"index": "not_analyzed" | |
}, | |
"uri": { | |
"type": "string", | |
"index": "not_analyzed" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment