Skip to content

Instantly share code, notes, and snippets.

@travishegner
Last active May 6, 2022 15:44
Show Gist options
  • Save travishegner/10cdd90aa89b75537c76 to your computer and use it in GitHub Desktop.
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
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