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 " " [
|
||||
''(?P<remote_addr>.*?)(@-|@(?P<request_scheme>.*?)|)''
|
||||
''(-|(?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<request_method>.*?) (?P<path>.*?)( (?P<request_version>HTTP/.*))?\"''
|
||||
''(?P<status>.*?)''
|
||||
|
|
@ -102,6 +102,8 @@ in {
|
|||
request_id = null;
|
||||
userid = null;
|
||||
virtual_host = null;
|
||||
server_port = null;
|
||||
server_name = null;
|
||||
request_method = null;
|
||||
path = null;
|
||||
request_version = null;
|
||||
|
|
|
|||
|
|
@ -315,10 +315,16 @@ in
|
|||
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'
|
||||
' "$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'
|
||||
' "$http_referer" "$http_user_agent"';
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue