I am streaming sys logs to log stash. To make them more useful I added a dns filter so we can see machine name:
dns {
reverse => [ "remoteAddress" ]
action => "replace"
}
This is working well. I want to update the existing "remoteAddress" fields and replace the IP with the host name. I have looked at the bulk update API and the update by query api and can't figure out how to do this. There's only a handful of values so i don't mind writing a couple of API requests by hand to do this.
Using the Dev Tool link in the Kibana UI, I have been trying something like this with no luck:
POST myindex/_update_by_query
{
"query" : {
"term" : {
"remoteAddress" : { "1.2.3.4" }
}
}
"replace" : {
"doc" : {
"remoteAddress" : { "myservername" }
}
}
}
i have been looking online for simple examples to build my query with, no luck. Any help would be greatly appreciated.
Thanks,
Pete