forked from Drift/pvv-nixos-config
Merge pull request 'add gitea metrics' (!78) from gitea-metric into main
Reviewed-on: Drift/pvv-nixos-config#78 Reviewed-by: Oystein Kristoffer Tveit <oysteikt@pvv.ntnu.no>
This commit is contained in:
commit
5a76b62700
|
@ -55,6 +55,11 @@ in {
|
|||
USER = "gitea@pvv.ntnu.no";
|
||||
SUBJECT_PREFIX = "[pvv-git]";
|
||||
};
|
||||
metrics = {
|
||||
ENABLED = true;
|
||||
ENABLED_ISSUE_BY_LABEL = true;
|
||||
ENABLED_ISSUE_BY_REPOSITORY = true;
|
||||
};
|
||||
indexer.REPO_INDEXER_ENABLED = true;
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
|
@ -109,12 +114,21 @@ in {
|
|||
forceSSL = true;
|
||||
enableACME = true;
|
||||
kTLS = true;
|
||||
locations."/" = {
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://unix:${cfg.settings.server.HTTP_ADDR}";
|
||||
extraConfig = ''
|
||||
client_max_body_size 512M;
|
||||
'';
|
||||
};
|
||||
"/metrics" = {
|
||||
proxyPass = "http://unix:${cfg.settings.server.HTTP_ADDR}";
|
||||
extraConfig = ''
|
||||
allow ${values.hosts.ildkule.ipv4}/32;
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -75,6 +75,12 @@ in {
|
|||
url = "https://grafana.com/api/dashboards/240/revisions/3/download";
|
||||
options.path = dashboards/go-processes.json;
|
||||
}
|
||||
{
|
||||
name = "Gitea Dashbaord";
|
||||
type = "file";
|
||||
url = "https://grafana.com/api/dashboards/17802/revisions/3/download";
|
||||
options.path = dashboards/gitea-dashbaord.json;
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }: {
|
||||
imports = [
|
||||
./gogs.nix
|
||||
./gitea.nix
|
||||
./matrix-synapse.nix
|
||||
# TODO: enable once https://github.com/NixOS/nixpkgs/pull/242365 gets merged
|
||||
# ./mysqld.nix
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.prometheus.scrapeConfigs = [{
|
||||
job_name = "gitea";
|
||||
scrape_interval = "60s";
|
||||
scheme = "https";
|
||||
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"git.pvv.ntnu.no:443"
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ config, ... }: let
|
||||
cfg = config.services.prometheus;
|
||||
in {
|
||||
services.prometheus.scrapeConfigs = [{
|
||||
job_name = "git-gogs";
|
||||
scheme = "https";
|
||||
metrics_path = "/-/metrics";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"essendrop.pvv.ntnu.no:443"
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
}
|
Loading…
Reference in New Issue