Create index pattern automatically

I also found this other similar thread: Kibana 5.0 Ingest API