Have you come across arbtt? It's a script that pretty much does exactly the same thing, but comes with a few extras for categorization and analysis.
This is not perfect either, but its just a little extra work to convert it to JSON and put it in elasticsearch to use kibana on it.