You should have a raw log generated by nginx with this custom format, it's really more easy to build grok regex.
Then with a single log, build your regex online ( https://grokdebug.herokuapp.com/) or through Kibana / Dev tools / Grok Debugger (Kibana 5.5 or earlier). Use grok patterns is better (smaller and efficient regex).
Finally, use grok plugin in Logstash to match your message field with your regex.
If the GeoIP resolution (IP address into localisation) is done by Nginx, you can parse directly the localisation into ES document fields. it seem the case.
Otherwise, use the Logstasth GeoIP plugin after grok.
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.