monitoring
This commit is contained in:
parent
60da98d29b
commit
faf18b92a3
1 changed files with 2 additions and 6 deletions
|
@ -1,8 +1,4 @@
|
|||
{ config, ... }: let
|
||||
format = ''
|
||||
$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" \"$http_x_forwarded_for\"
|
||||
'';
|
||||
in {
|
||||
{ config, ... }: {
|
||||
services.prometheus.exporters.nginxlog = {
|
||||
enable = true;
|
||||
port = 14201;
|
||||
|
@ -18,7 +14,7 @@ in {
|
|||
};
|
||||
|
||||
services.nginx.commonHttpConfig = ''
|
||||
log_format combined2 "${format}";
|
||||
log_format combined2 "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" \"$http_x_forwarded_for\"";
|
||||
access_log /var/log/nginx/access.log combined2;
|
||||
|
||||
'';
|
||||
|
|
Loading…
Add table
Reference in a new issue