Hi,
I load a file to elasticsearch from Logstash.
input {
file {
path => ["/home/user/iops.csv"]
start_position => "beginning"
}
}
filter {
csv {
separator => ","
columns => ["Array","LUN","Availability (%)","Storage Group","Storage Pool","Storage Pool type","RAID Level","Capacity (GB)",
"IOPS","Bandwidth (MB/s)","Utilization (%)","Service Time (ms)","Response Time (ms)","Queue Length"]
}
mutate {convert => ["Capacity (GB)", "float"]}
mutate {convert => ["LUN", "string"]}
mutate {convert => ["Storage Pool", "string"]}
mutate {convert => ["IOPS", "float"]}
mutate {convert => ["Bandwidth (MB/s)", "float"]}
mutate {convert => ["Utilization (%)", "float"]}
mutate {convert => ["Service Time (ms)", "float"]}
mutate {convert => ["Response Time (ms)", "float"]}
mutate {convert => ["Queue Length", "float"] }
}
output {
elasticsearch {
action => "index"
host => "localhost"
index => "kpi"
workers => 1
}
stdout { codec => rubydebug}
}
I want to convert the LUN field to "Not Analyzed".
How Can I do it ?
Getting the Indexes returns this,
curl -XGET 'http://localhost:9200/kpi/_mappings'
{"kpi":{"mappings":{"logs":{"properties":{"@timestamp":{"type":"date","format":"dateOptionalTime"},"@version":{"type":"string"},"Array":{"type":"string"},"Availability (%)":{"type":"string"},"Bandwidth (MB/s)":{"type":"double"},"Capacity (GB)":{"type":"double"},"IOPS":{"type":"double"},"LUN":{"type":"string"},"Queue Length":{"type":"double"},"RAID Level":{"type":"string"},"Response Time (ms)":{"type":"double"},"Service Time (ms)":{"type":"double"},"Storage Group":{"type":"string"},"Storage Pool":{"type":"string"},"Storage Pool type":{"type":"string"},"Utilization (%)":{"type":"double"},"host":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}}}}}}
However, I don't have much idea on changing the mapping.
Really appreciate any help.
Regards