summaryrefslogtreecommitdiff
path: root/nixos/hosts/tente/monitoring.nix
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-08-27 21:19:14 +0200
committerMartin Fischer <martin@push-f.com>2025-08-27 23:54:48 +0200
commita1ec6b1a0d53c2a01ed283e49ef35fb81760a48a (patch)
tree45c4484955aef30bc6985f76211aba2ba58ec029 /nixos/hosts/tente/monitoring.nix
parent613346ff97f9c3ac2e9026613aa4b183a06917a2 (diff)
tente: replace gotify with grafana-matrix-forwarder
Diffstat (limited to 'nixos/hosts/tente/monitoring.nix')
-rw-r--r--nixos/hosts/tente/monitoring.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/hosts/tente/monitoring.nix b/nixos/hosts/tente/monitoring.nix
index a999c8a..f6ed7cf 100644
--- a/nixos/hosts/tente/monitoring.nix
+++ b/nixos/hosts/tente/monitoring.nix
@@ -9,6 +9,9 @@ in
grafanaUiPort = lib.mkOption {
type = lib.types.int;
};
+ grafanaMatrixForwarderPort = lib.mkOption {
+ type = lib.types.int;
+ };
lokiPort = lib.mkOption {
type = lib.types.int;
};
@@ -21,13 +24,19 @@ in
prometheusSqlExporterPort = lib.mkOption {
type = lib.types.int;
};
+ matrixServerUrl = lib.mkOption {
+ type = lib.types.str;
+ };
};
imports = [
<top/shared/prometheus-sql-exporter/service.nix>
+ <top/shared/grafana-matrix-forwarder/service.nix>
];
config = {
+ age.secrets.grafana-matrix-forwarder-env.file = <top/secrets/grafana-matrix-forwarder-env.age>;
+
services.grafana = {
enable = true;
settings = {
@@ -54,6 +63,12 @@ in
];
};
};
+ services.grafana-matrix-forwarder = {
+ enable = true;
+ port = cfg.grafanaMatrixForwarderPort;
+ homeserver = cfg.matrixServerUrl;
+ environmentFile = config.age.secrets.grafana-matrix-forwarder-env.path;
+ };
services.prometheus = {
enable = true;