puppet-nginx icon indicating copy to clipboard operation
puppet-nginx copied to clipboard

Add nginx config for stream log

Open genebean opened this issue 4 years ago • 5 comments

Pull Request (PR) description

This adds the ability to configure logging for stream configuration in Nginx, like getting IP addresses from access logging.

This PR includes the changes in #1401. That PR was built on #1336. This PR simply pulls in the changes atop the current version of master.

closes #1401 closes #1336

genebean avatar Jan 22 '21 15:01 genebean

nginx::config is a class

Breaking changes to this file MAY impact these 2 modules (near match):

nginx is a class

Breaking changes to this file WILL impact these 14 modules (exact match):
Breaking changes to this file MAY impact these 34 modules (near match):

nginx::params is a class

Breaking changes to this file MAY impact these 1 modules (near match):

This module is declared in 9 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Could you add documentation strings? For example, what's the difference between $stream_format_log and $stream_log_format?

It has been a while since this code was written, and we're not using stream_format_log internally.

The stream_log_format is intended to work the same as access_log_format

 nginx::stream_log_format:
  basic: '$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time $server_addr:$server_port $upstream_addr'

The stream_format_log is intended to provide a custom format for the mycustomformat value of access_log, but for use with stream logs.

The stream_format_log could potentially be removed, it's not clear if this would be used.

ardrigh avatar Jul 07 '21 01:07 ardrigh

For what it's worth, at my work we'd love to have the functionality of stream_log_format, but I don't see a use-case for the stream_format_log parameter either.

bbetter173 avatar Jul 28 '21 05:07 bbetter173

@ekohl the tests on this PR have expired so cannot see what the failures are.

Are you happy with the comments above?

ardrigh avatar Jul 29 '21 00:07 ardrigh

I think https://github.com/voxpupuli/puppet-nginx/pull/1461 replaces this one, right?

ekohl avatar Jul 30 '21 10:07 ekohl