Skip to content

Instantly share code, notes, and snippets.

@vmadman
Created April 27, 2013 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmadman/5472170 to your computer and use it in GitHub Desktop.
Save vmadman/5472170 to your computer and use it in GitHub Desktop.
This is just the log settings I put on each of our virtual hosts so that they pipe logs to LogStash via a UDP proxy. In my setup the error UDP port increments for each virtual host, which allows my LogStash shipper to apply hostnames.
# Error logging to LogStash via UDP client pipe
ErrorLog "||/usr/local/bin/udpclient.pl 127.0.0.1 5002"
LogLevel warn
# Access logging to LogStash via UDP client pipe
CustomLog "||/usr/local/bin/udpclient.pl 127.0.0.1 5001" ls_apache_json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment