<div dir="ltr">Currently I run Nginx as a reverse proxy in a Docker container.<div><br></div><div><font face="monospace">FROM nginx<br><br>ENV DEBIAN_FRONTEND noninteractive<br><br>... Details hidden ...<br><br>EXPOSE 80<br>EXPOSE 443<br><br>CMD nginx -g 'daemon off;'</font><br></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">We are wanting to use Graylog, and have it for our other containers.  So I want to now use it for Nginx.  Graylog is like Syslog.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">I went to follow this guide:</font></div><div><font face="arial, sans-serif"><br></font></div><div><a href="https://github.com/ronlut/graylog-content-pack-nginx-docker">https://github.com/ronlut/graylog-content-pack-nginx-docker</a><font face="arial, sans-serif"><br></font></div><div><br></div><div>It recommends we symbolically link the logs to stdout/stderr (which is already part of the docker container) and it then uses this language (see the bottom of the the README.md at github):</div><div><br></div><div><p dir="auto" style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,47);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px"><span style="box-sizing:border-box;font-weight:600">Run</span></p><p dir="auto" style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,47);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px">Now, when your logs are collected by docker from stdout & stderr, you can run your docker using this command:</p><div class="gmail-snippet-clipboard-content gmail-position-relative gmail-overflow-auto" style="box-sizing:border-box;color:rgb(36,41,47);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;overflow:auto"><pre style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:13.6px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px"><code style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;padding:0px;margin:0px;background:transparent;border-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit">docker run --log-driver=gelf --log-opt gelf-address=udp://<GraylogIP>:12401 <ImageName> <Command>
</code></pre></div><p dir="auto" style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,47);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px">for example:</p><div class="gmail-snippet-clipboard-content gmail-position-relative gmail-overflow-auto" style="box-sizing:border-box;color:rgb(36,41,47);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;overflow:auto"><pre style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:13.6px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px"><code style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;padding:0px;margin:0px;background:transparent;border-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit">docker run --log-driver=gelf --log-opt gelf-address=udp://<GraylogIP>:12401 busybox echo Hello Graylog
</code></pre></div><h3 dir="auto" style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:1.25em;line-height:1.25;color:rgb(36,41,47);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""><a id="gmail-user-content-screenshots" class="gmail-anchor" aria-hidden="true" href="https://github.com/ronlut/graylog-content-pack-nginx-docker#screenshots" style="box-sizing:border-box;background-color:transparent;text-decoration-line:none;float:left;padding-right:4px;line-height:1"></a></h3>Has anyone had any experience with this? Or understand this last set of steps?</div><div><br></div><div>Thank you</div><div><br></div><div>Julian</div><div><br></div><div><br></div><div><br></div><div><font face="monospace"><br></font></div></div>