diff options
| author | Martin Fischer <martin@push-f.com> | 2025-12-30 09:47:28 +0100 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2025-12-30 19:09:14 +0100 |
| commit | 03d7666c626e63ccc56d384ed685c4ac89369b55 (patch) | |
| tree | 9e89e3c9e40d845acbe8985a16f99be603827f82 /nixos | |
| parent | 5de2f00a720e29cdc81f5300a69cda46f12902ab (diff) | |
feat(tente): add git-grep-exporter
Diffstat (limited to 'nixos')
| -rw-r--r-- | nixos/hosts/tente/default.nix | 21 | ||||
| -rw-r--r-- | nixos/hosts/tente/ports.nix | 1 | ||||
| -rw-r--r-- | nixos/npins/sources.json | 12 |
3 files changed, 34 insertions, 0 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix index 2ecfbcb..065c264 100644 --- a/nixos/hosts/tente/default.nix +++ b/nixos/hosts/tente/default.nix @@ -31,6 +31,7 @@ in ./matrix.nix ./exporters.nix ./grafana.nix + "${sources.my-git-grep-exporter}/service.nix" "${sources.my-lex-surf}/service.nix" "${sources.my-osm-proposals}/service.nix" "${sources.my-geopos-link}/service.nix" @@ -239,6 +240,20 @@ in sqlExporterPort = ports.prometheusSqlExporter; storageboxExporterPort = ports.prometheusStorageboxExporter; }; + services.gitGrepExporter = { + enable = true; + port = ports.prometheusGitGrepExporter; + extraGroups = ["git"]; + patterns = { + todo = ''\bTO'' + ''DO\b''; + fixme = ''\bFIX'' + ''ME\b''; + }; + repos = builtins.listToAttrs (map (name: { name = name; value = "${reposDir}/${name}.git"; }) [ + "forester" + "hosehawk" + "lotta" + ]); + }; monitoring = { alloyUiPort = ports.grafanaAlloy; @@ -266,6 +281,12 @@ in targets = ["localhost:${toString ports.prometheusStorageboxExporter}"]; }]; } + { + job_name = "git-grep"; + static_configs = [{ + targets = ["localhost:${toString ports.prometheusGitGrepExporter}"]; + }]; + } ]; }; diff --git a/nixos/hosts/tente/ports.nix b/nixos/hosts/tente/ports.nix index 69e0dbd..773396e 100644 --- a/nixos/hosts/tente/ports.nix +++ b/nixos/hosts/tente/ports.nix @@ -9,6 +9,7 @@ rec { prometheusNodeExporter = 9002; prometheusSqlExporter = 9003; prometheusStorageboxExporter = 9004; + prometheusGitGrepExporter = 9005; webUis = { inherit diff --git a/nixos/npins/sources.json b/nixos/npins/sources.json index 0008bbb..29affe7 100644 --- a/nixos/npins/sources.json +++ b/nixos/npins/sources.json @@ -39,6 +39,18 @@ "url": null, "hash": "02ld2hpl3pmy54bqs8q7m0515lqsyajj9fxrhpf9qm1bjvc4f14w" }, + "my-git-grep-exporter": { + "type": "Git", + "repository": { + "type": "Git", + "url": "https://git.push-f.com/git-grep-exporter" + }, + "branch": "master", + "submodules": false, + "revision": "d18ad307fc8084f9b5479e8fc08d4fbc427738c5", + "url": null, + "hash": "0wjggrwiqrzj8mny08asqi3xjw3ifsdd8mkd291aydsh9kc22b1s" + }, "my-inkstitch": { "type": "Git", "repository": { |
