trying to read in a simple XML document, and outputting it after splitting. However I get an error message "only strings and arrays are splittable"
input {
file {
path => "H:\logstash\zipped_folders\logstash-2.3.1\bin\data\xml_to_json"
start_position => "beginning"
}
}
filter {
xml {
source => "message"
target => "parsed"
}
split {
field => "[parsed][station]"
add_field => {
id => "%{[parsed][station][id]}-%{[parsed][station][lastCommWithServer]}"
stationName => "%{[parsed][station][name]}"
lastCommWithServer => "%{[parsed][station][lastCommWithServer]}"
lat => "%{[parsed][station][lat]}"
long => "%{[parsed][station][long]}"
numBikes => "%{[parsed][station][nbBikes]}"
numEmptyDocks => "%{[parsed][station][nbEmptyDocks]}"
}
}
}
output {
file {
codec => json
path => "H:\logstash\logstash_outputfiles\stack_trace_file1.json"
}
}