-
-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http_format_log for nginx servers #1139
Comments
The |
I might have not been quite clear: what I would like to do is from my nginx server blocks to use a specific log_format which of course I would have defined in the http context as you correctly mention. This is currently not possible as the |
I'm pretty sure this is already possible. I use this module with json formatted logs. |
Ah right, that's the problem. In the main class it's called |
Ahh thank you that was exactly what I was looking for, namely |
BTW, in newer versions of nginx, class { 'nginx':
log_format =>
{
'logstash_json' => 'escape=json \'{ "@timestamp": "$time_iso8601", ...',
}
} |
@hostingnuggets I'm glad we were able to help. PRs to improve the docs are always welcome! :) |
btw, while the main class does need an improvement in parameter docs, location and server resources do actually have mostly-complete docs -- for this case: https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/resource/server.pp#L101-L106 |
@wyardley cheers for the precisions! |
The
nginx::http_format_log
config parameter only applies to the main nginx.conf file. It would be nice to have the possibility to customize the log format per nginx server. For example by using the following hiera config parameter:The text was updated successfully, but these errors were encountered: