Created
March 22, 2013 03:33
-
-
Save jcartledge/5218752 to your computer and use it in GitHub Desktop.
Parse timestamps, queries and facets out of Apache Solr logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cat 20* | grep solr/select | perl -MURI::Escape -ne 's/(\d+\.\d+\.\d+\.\d+)[\s\-]+\[([^\]]+)\] "GET \/solr\/select.*(&fq=([^&]*)?).*(&q=([^&]*)?).* 200 /\2\t\6\t\4\t/ && print uri_unescape($_)' - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment