Last active
May 6, 2022 15:44
-
-
Save travishegner/10cdd90aa89b75537c76 to your computer and use it in GitHub Desktop.
A quick bash one liner to convert haproxy logs to something like apache logs so that logstalgia can read them
This file contains 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
tail -f log | stdbuf -o0 awk '{print $9" "$6" - - "$7" "$18" "$19" "$20" "$11" "$12}' | sed -u "s/:[0-9]\{4,5\}//g" | sed -u "s/\(:[0-6][0-9]\)\.[0-9]\{3\}/\\1 -400/g" | logstalgia --sync --paddle-mode vhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment