mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-04-04 05:01:21 +02:00
WIP: gitea metrics
This commit is contained in:
parent
c90dda4f85
commit
0625b16e50
@ -45,6 +45,7 @@ in {
|
|||||||
DISABLE_GRAVATAR = true;
|
DISABLE_GRAVATAR = true;
|
||||||
ENABLE_FEDERATED_AVATAR = false;
|
ENABLE_FEDERATED_AVATAR = false;
|
||||||
};
|
};
|
||||||
|
metrics.ENABLED = true;
|
||||||
actions.ENABLED = true;
|
actions.ENABLED = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -61,6 +62,15 @@ in {
|
|||||||
client_max_body_size 512M;
|
client_max_body_size 512M;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
locations."/metrics" = {
|
||||||
|
proxyPass = "http://unix:${cfg.settings.server.HTTP_ADDR}";
|
||||||
|
extraConfig = ''
|
||||||
|
allow ${values.hosts.ildkule.ipv4};
|
||||||
|
allow ${values.hosts.ildkule.ipv6};
|
||||||
|
deny all;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||||
|
12
hosts/ildkule/services/metrics/prometheus/gitea.nix
Normal file
12
hosts/ildkule/services/metrics/prometheus/gitea.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ values, ... }:
|
||||||
|
{
|
||||||
|
# Gitea already exports at /metrics
|
||||||
|
services.prometheus.scrapeConfigs = [{
|
||||||
|
job_name = "gitea";
|
||||||
|
scrape_interval = "15s";
|
||||||
|
metrics_path = "/metrics/gitea";
|
||||||
|
static_configs = [{
|
||||||
|
targets = [ "git.pvv.ntnu.no:443" ];
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user