feat: maybe now logging is better'ish

This commit is contained in:
xyno (Philipp Hochkamp) 2023-08-01 16:41:43 +02:00
parent 3afc46dd2f
commit c955e6ba58

View file

@ -20,6 +20,7 @@ in
(mkIf (cfg.master.hostname == hostName) {
services.loki.enable = true;
services.loki.configFile = pkgs.writeText "loki.yml" ''
chunk_target_size: 5242880
auth_enabled: false
server:
http_listen_port: 3100
@ -49,6 +50,7 @@ in
reporting_enabled: false
'';
services.prometheus = {
alertmanager.enable = true;
enable = true;
scrapeConfigs = foldl (a: b: a ++ b) [ ] (map
(x: (map
@ -117,6 +119,10 @@ in
regex = {
expression = ''(?P<remote_addr>.+) - - \[(?P<time_local>.+)\] "(?P<method>.+) (?P<url>.+) (HTTP\/(?P<version>\d.\d))" (?P<status>\d{3}) (?P<body_bytes_sent>\d+) (["](?P<http_referer>(\-)|(.+))["]) (["](?P<http_user_agent>.+)["])'';
};
drop = {
source = "url";
expression = ''/(_matrix|.well-known|notifications|api|identity).*'';
};
}
{
labels = {