私はELKスタックの初心者であり、おそらく複雑な構成をセットアップしようとしています... :-)
Windows 7 ラップトップでスタック全体を実行しています。うまくいくCSVをインポートしていますが、文字列フィールドを分析できないため、キバナの視覚化で壊れたテキストが表示されます。
最後の試みはテンプレートを使ったものでした。
テンプレートと conf ファイルはどちらも c:\logstash-1.5.0\bin ディレクトリにあります。
これはconfファイルです:
input {
file {
path => "C:\Users\jeroen\Documents\temp\CSV\ElasticSearch_Input_vc.csv"
type => "core2"
start_position => "beginning" }
}
filter {
csv {
columns => ["snapshot_date_time","Country","Tower","Service","Division","USD Group","Ref Nr","Processtype","Importance","Priority","Severity","Status and Reason","Category","Is_Valid_Category","Summary","Open Date Time","Closed Date Time","Opened By","Last Modified","Resolve Completed Date Time","Hrs_Assigned_To_Completed","First Assign Date Time","Hrs_New_To_Assign","Customer Organization","Requested By","Assignee","Active Flag","In Out SLA Resolution 1"]
separator => ";"
}
date
{ match => [ "snapshot_date_time", "yyyy-MM-dd HH:mm:ss" ] }
mutate {
convert => { "Hrs_Assigned_To_Completed" => "float" }
convert => { "Hrs_New_To_Assign" => "float" }
}
}
output {
elasticsearch {
action => "index"
host => "localhost"
index => "qdb-%{+YYYY.MM.dd}"
workers => 1
template => "template.json"
}
#stdout {
#codec => rubydebug
#}
}
そして、これがテンプレートです (正直なところ、別のトピックからコピーして「テンプレート名」を変更しただけです)。これはおそらく作成者が使用するデータに固有のものであるため、7 行目をどうするかは疑問です...
#template.json:
{
"template": "qdb-%{+YYYY.MM.dd}",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index" : {"query" : { "default_field" : "userid" }
}
},
"mappings": {
"_default_": {
"_all": { "enabled": false },
"_source": { "compress": true },
"dynamic_templates": [
{
"string_template" : {
"match" : "*",
"mapping": { "type": "string", "index": "not_analyzed" },
"match_mapping_type" : "string"
}
}
],
"properties" : {
"date" : { "type" : "date", "format": "yyyy-MM-dd HH:mm:ss"},
"device" : { "type" : "string", "fields": {"raw": {"type": "string","index":
"not_analyzed"}}},
"distance" : { "type" : "integer"}
}
}
}
ヘルプ/ヒント/ヒントは大歓迎です!