mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
chore(monitoring): include server port in logs
This commit is contained in:
parent
7e82a12236
commit
aff6183ac2
3 changed files with 14 additions and 4 deletions
|
|
@ -85,7 +85,7 @@ in {
|
||||||
regex.expression = concatStringsSep " " [
|
regex.expression = concatStringsSep " " [
|
||||||
''(?P<remote_addr>.*?)(@-|@(?P<request_scheme>.*?)|)''
|
''(?P<remote_addr>.*?)(@-|@(?P<request_scheme>.*?)|)''
|
||||||
''(-|(?P<remote_log_name>.*?))(@-|@(?P<request_id>.*?)|)''
|
''(-|(?P<remote_log_name>.*?))(@-|@(?P<request_id>.*?)|)''
|
||||||
''(-|(?P<userid>.*?))(@(?P<virtual_host>.*?))?''
|
''(-|(?P<userid>.*?))(@(-|(?P<virtual_host>.*?))(@(-|(?P<server_name>.*?))(:-|:80|:443|:(?P<server_port>.*?)|)|)|)''
|
||||||
''\[(?P<timestamp>.*?)\]''
|
''\[(?P<timestamp>.*?)\]''
|
||||||
''\"(?P<request_method>.*?) (?P<path>.*?)( (?P<request_version>HTTP/.*))?\"''
|
''\"(?P<request_method>.*?) (?P<path>.*?)( (?P<request_version>HTTP/.*))?\"''
|
||||||
''(?P<status>.*?)''
|
''(?P<status>.*?)''
|
||||||
|
|
@ -102,6 +102,8 @@ in {
|
||||||
request_id = null;
|
request_id = null;
|
||||||
userid = null;
|
userid = null;
|
||||||
virtual_host = null;
|
virtual_host = null;
|
||||||
|
server_port = null;
|
||||||
|
server_name = null;
|
||||||
request_method = null;
|
request_method = null;
|
||||||
path = null;
|
path = null;
|
||||||
request_version = null;
|
request_version = null;
|
||||||
|
|
|
||||||
|
|
@ -315,10 +315,16 @@ in
|
||||||
default $proxied_host_x;
|
default $proxied_host_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_format combined_proxied '$proxied_remote_addr@$proxied_scheme proxied $remote_user@$proxied_host [$time_local]'
|
log_format combined_proxied '$proxied_remote_addr@$proxied_scheme'
|
||||||
|
' proxied'
|
||||||
|
' $remote_user@$proxied_host@$server_name:$server_port'
|
||||||
|
' [$time_local]'
|
||||||
' "$request" $status $body_bytes_sent'
|
' "$request" $status $body_bytes_sent'
|
||||||
' "$http_referer" "$http_user_agent"';
|
' "$http_referer" "$http_user_agent"';
|
||||||
log_format combined_cloudflared '$proxied_remote_addr_cf@$proxied_scheme cloudflared@$http_cf_ray $remote_user@$proxied_host_cf [$time_local]'
|
log_format combined_cloudflared '$proxied_remote_addr_cf@$proxied_scheme'
|
||||||
|
' cloudflared@$http_cf_ray'
|
||||||
|
' $remote_user@$proxied_host_cf@$server_name:$server_port'
|
||||||
|
' [$time_local]'
|
||||||
' "$request" $status $body_bytes_sent'
|
' "$request" $status $body_bytes_sent'
|
||||||
' "$http_referer" "$http_user_agent"';
|
' "$http_referer" "$http_user_agent"';
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ in {
|
||||||
map $scheme $hsts_header {
|
map $scheme $hsts_header {
|
||||||
https "max-age=31536000; includeSubdomains; preload";
|
https "max-age=31536000; includeSubdomains; preload";
|
||||||
}
|
}
|
||||||
log_format combined_host '$remote_addr@$scheme - $remote_user@$host [$time_local]'
|
log_format combined_host '$remote_addr@$scheme'
|
||||||
|
' - $remote_user@$host@$server_name:$server_port'
|
||||||
|
' [$time_local]'
|
||||||
' "$request" $status $body_bytes_sent'
|
' "$request" $status $body_bytes_sent'
|
||||||
' "$http_referer" "$http_user_agent"';
|
' "$http_referer" "$http_user_agent"';
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue