ronlut / graylog-content-pack-nginx-docker

A Content Pack for Graylog2 which supports streaming of logs from nginx running in docker
GNU General Public License v3.0
42 stars 21 forks source link

Track URL path #1

Closed ericandrewlewis closed 5 years ago

ericandrewlewis commented 6 years ago

Would it be possible to track the URL path as a separate field?

ronlut commented 6 years ago

Hi. I'm currently abroad and not in front of a computer.

Try adding ' "url_path": "$uri", ' or ' "url_path": "$request_uri", ' to the graylog2_json configuration.

You can lookup for additional variables here

Example of $request_uri: link

Hope that helps :)

ronlut commented 5 years ago

Closing, let me know if something is unclear

ericandrewlewis commented 5 years ago

Thanks for the notes!

Do you mind if I add a bit of explainer text to the README about logging other NGINX embedded variables? Something like:

You can log other useful information for each request by adding the desired NGINX variable into the JSON.

ronlut commented 5 years ago

Sure, go ahead! And thanks for the help 😀

ericandrewlewis commented 5 years ago

Cool - created https://github.com/ronlut/graylog-content-pack-nginx-docker/pull/2