I have an application that sends JSON messages to logstash. The JSON looks like this:
{
"status": "Successful",
"hosts": {
"server.example.com": {
"ok": 2,
"failed": "false"
},
"server2.example.com": {
"ok": 1,
"failed": "true"
}
}
}
Elasticsearch throws the error 'Field name [server.example.com] cannot contain '.'"'
I tried adding de_dot filter to replace the dots, but I can't get the nesting to work properly. It adds the tag, but the fields all stay the same.
de_dot {
fields => [ "hosts" ]
add_tag => [ "de_dot" ]
nested => true
}
Any suggestions on what I'm doing wrong with de_dot (or better options!)?
logstash 2.4.0
elasticsearch 2.4.0