Hi all,
I have a some problem with my logstash filter.
I read data from an xml and I want to split them to send to elasticsearch. The xml is like this:
but I split only "stationName" and not ip, can someone help me please?
There are many mount name in the xml and every name has a lot of client with different ip.
Thank you
Thank you Badger but it not works. This doesn't split even the station name
{
"tags" => [
[0] "_split_type_failure"
],
"@version" => "1",
"ip" => "%{[radio][mount][active_clients][0][client][ip][0]}",
"stationName" => "%{[radio][mount][name]}",
"@timestamp" => 2020-02-20T08:55:01.749Z
}
[2020-02-20T09:56:14,256][WARN ][logstash.filters.split ] Only String and Array types are splittable. field:[radio][mount] is of type = NilClass
[2020-02-20T09:56:14,262][WARN ][logstash.filters.split ] Only String and Array types are splittable. field:[radio][mount][active_clients][0][client] is of type = NilClass
The XML you posted is not valid, so I had to make some assumptions about what it looked like. If the filter does not parse it then I infer than those assumptions were incorrect. If you can post valid, complete XML then I could adjust the assumptions.
Hi Badger the xml is correct. As you can see the mount name Subasio.aac has 59 active_clients with different ip. Another mount name has some active_clients with different ip.
There are more than 200 mounts and everyone has a lots of clients.
I wish to split all the 59 clients for Suabasio.aac mount name and so on.
Thank you for your time
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.