about summary refs log tree commit diff
path: root/modules/services/gitea
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-24 14:01:01 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-24 14:01:01 -0700
commit15c5591c6e57031b6cd8ce85cbb3a38c9cdfa23d (patch)
tree2661e8a81f07c793a963c3b71792ce2399d55c9a /modules/services/gitea
parentbackups: do backups for the laptop (diff)
downloadworld-15c5591c6e57031b6cd8ce85cbb3a38c9cdfa23d.tar.gz
gitea: enable metric endpoint
Move configuration for the scraper into the gitea module itself.
Diffstat (limited to 'modules/services/gitea')
-rw-r--r--modules/services/gitea/default.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/services/gitea/default.nix b/modules/services/gitea/default.nix
index 6259c30..e5a3db7 100644
--- a/modules/services/gitea/default.nix
+++ b/modules/services/gitea/default.nix
@@ -29,7 +29,11 @@ in {
       httpAddress = "127.0.0.1";
       httpPort = 8002;
       log.level = "Error";
-      settings = { other.SHOW_FOOTER_VERSION = false; };
+      settings = {
+        other.SHOW_FOOTER_VERSION = false;
+        metrics.ENABLED = true;
+        metrics.ENABLED_ISSUE_BY_REPOSITORY = true;
+      };
       dump.enable = false;
       database = {
         type = "sqlite3";
@@ -46,6 +50,14 @@ in {
       };
     };
 
+    services.prometheus.scrapeConfigs = [{
+      job_name = "gitea";
+      metrics_path = "/metrics";
+      scheme = "https";
+      scrape_interval = "30s";
+      static_configs = [{ targets = [ "git.fcuny.net" ]; }];
+    }];
+
     my.services.backup = { paths = [ cfg.stateDir ]; };
   };
 }