-
-
Save ingmarioalberto/ac170f4d01bcd88037f73ae2b99e62fe 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
ssh USER@IP tail -f /var/log/haproxy-traffic.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