have a problem when i try to import the following XML file in ElasticSearch with Logstash:
<test>
<param name="param1" raw="0x01">
<param name="param2" raw="0x02" eng="2">
<param name="param3" raw="0x03" eng="3">
</test>
My Logstash conf file is the following (extract):
xml {
store_xml => false
source => "message"
xpath => [
"/test/param/@name", "name",
"/test/param/@raw", "raw",
"/test/param/@eng", "eng"
]
}
After running Logstash, the ElasticSearch database contains:
"name": [
"param1",
"param2",
"param3",
],
"raw": [
"0x01",
"0x02",
"0x02",
],
"eng": [
2,
3,
],
I want this:
...
"eng": [
null,
2,
3,
],
How can i force a null (or None or NaN) value in a non existing field ?
Thanks in advance !