From c64d28fc2623aef78b9e07c2cab03cf0ef872636 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sat, 14 Sep 2024 20:21:12 +0200 Subject: [PATCH] Prometheus: Monitor gitea metrics --- .../services/monitoring/prometheus/default.nix | 2 +- .../services/monitoring/prometheus/gitea.nix | 16 ++++++++++++++++ .../services/monitoring/prometheus/gogs.nix | 16 ---------------- 3 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 hosts/ildkule/services/monitoring/prometheus/gitea.nix delete mode 100644 hosts/ildkule/services/monitoring/prometheus/gogs.nix diff --git a/hosts/ildkule/services/monitoring/prometheus/default.nix b/hosts/ildkule/services/monitoring/prometheus/default.nix index cd4e4a9..957c251 100644 --- a/hosts/ildkule/services/monitoring/prometheus/default.nix +++ b/hosts/ildkule/services/monitoring/prometheus/default.nix @@ -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 diff --git a/hosts/ildkule/services/monitoring/prometheus/gitea.nix b/hosts/ildkule/services/monitoring/prometheus/gitea.nix new file mode 100644 index 0000000..c7573e7 --- /dev/null +++ b/hosts/ildkule/services/monitoring/prometheus/gitea.nix @@ -0,0 +1,16 @@ +{ ... }: +{ + services.prometheus.scrapeConfigs = [{ + job_name = "gitea"; + scrape_interval = "60s"; + scheme = "https"; + + static_configs = [ + { + targets = [ + "git.pvv.ntnu.no:443" + ]; + } + ]; + }]; +} diff --git a/hosts/ildkule/services/monitoring/prometheus/gogs.nix b/hosts/ildkule/services/monitoring/prometheus/gogs.nix deleted file mode 100644 index 06f52a3..0000000 --- a/hosts/ildkule/services/monitoring/prometheus/gogs.nix +++ /dev/null @@ -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" - ]; - } - ]; - }]; -}