modules/nginx: log to syslog in logfmt format
This commit is contained in:
parent
563efc95e4
commit
1d32eb782e
2 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,8 @@ in
|
||||||
server_names_hash_bucket_size 128;
|
server_names_hash_bucket_size 128;
|
||||||
proxy_headers_hash_max_size 4096;
|
proxy_headers_hash_max_size 4096;
|
||||||
proxy_headers_hash_bucket_size 128;
|
proxy_headers_hash_bucket_size 128;
|
||||||
|
log_format fmt_loki 'host=$host remote_addr=$remote_addr remote_user=$remote_user request="$request" status=$status body_bytes_sent=$body_bytes_sent http_referer="$http_referer" http_user_agent="$http_user_agent"';
|
||||||
|
access_log syslog:server=unix:/dev/log,tag=nginx_access,nohostname fmt_loki;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.phpfpm.pools.www = {
|
services.phpfpm.pools.www = {
|
||||||
|
|
|
@ -23,6 +23,8 @@ in
|
||||||
server_names_hash_bucket_size 128;
|
server_names_hash_bucket_size 128;
|
||||||
proxy_headers_hash_max_size 4096;
|
proxy_headers_hash_max_size 4096;
|
||||||
proxy_headers_hash_bucket_size 128;
|
proxy_headers_hash_bucket_size 128;
|
||||||
|
log_format fmt_loki 'host=$host remote_addr=$remote_addr remote_user=$remote_user request="$request" status=$status body_bytes_sent=$body_bytes_sent http_referer="$http_referer" http_user_agent="$http_user_agent"';
|
||||||
|
access_log syslog:server=unix:/dev/log,tag=nginx_access,nohostname fmt_loki;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.phpfpm.pools.www = {
|
services.phpfpm.pools.www = {
|
||||||
|
|
Loading…
Reference in a new issue