aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/mo
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-19 16:49:13 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-19 16:50:30 +0200
commit468c8f054e5fa8380409329c5323eaebd2f7c0b9 (patch)
tree69131ab45c3c2a5d115e6983769b0fb5eab75d30 /modules/by-name/mo
parentmodules/monitoring/prometheus: Actually configure the systemd exporter (diff)
downloadnixos-server-468c8f054e5fa8380409329c5323eaebd2f7c0b9.zip
modules/monitoring/{grafana,loki}: Small code-cleanups
Diffstat (limited to 'modules/by-name/mo')
-rw-r--r--modules/by-name/mo/monitoring/components/grafana.nix5
-rw-r--r--modules/by-name/mo/monitoring/components/loki.nix84
2 files changed, 45 insertions, 44 deletions
diff --git a/modules/by-name/mo/monitoring/components/grafana.nix b/modules/by-name/mo/monitoring/components/grafana.nix
index 7b9665a..534ac78 100644
--- a/modules/by-name/mo/monitoring/components/grafana.nix
+++ b/modules/by-name/mo/monitoring/components/grafana.nix
@@ -150,9 +150,10 @@ in {
../dashboards/Performance.json
../dashboards/Scraping_Jobs.json
];
+
+ anubis.instances."${cfg.fqdn}".target = "http://${config.services.grafana.settings.server.http_addr}:${toString cfg.port}";
};
- vhack.anubis.instances."${cfg.fqdn}".target = "http://${config.services.grafana.settings.server.http_addr}:${toString cfg.port}";
services = {
postgresql = {
ensureUsers = [
@@ -209,7 +210,7 @@ in {
folder = "Vhack";
options.path = pkgs.symlinkJoin {
name = "dashboards";
- paths = map (p: pkgs.runCommand "davhackoard" {} "mkdir $out; cp ${p} $out") cfg.dashboards;
+ paths = map (p: pkgs.runCommand "dashoard" {} "mkdir $out; cp ${p} $out") cfg.dashboards;
};
allowUiUpdates = true;
disableDeletion = true;
diff --git a/modules/by-name/mo/monitoring/components/loki.nix b/modules/by-name/mo/monitoring/components/loki.nix
index ac9b1fa..149e577 100644
--- a/modules/by-name/mo/monitoring/components/loki.nix
+++ b/modules/by-name/mo/monitoring/components/loki.nix
@@ -67,48 +67,6 @@ in {
};
};
services = {
- loki = {
- enable = true;
- dataDir = "/var/lib/loki";
- package = pkgs.grafana-loki;
- configuration = {
- auth_enabled = false;
-
- server.http_listen_port = cfg.port;
-
- common = {
- ring = {
- instance_addr = "127.0.0.1";
- kvstore = {
- store = "inmemory";
- };
- };
-
- replication_factor = 1;
- path_prefix = "/tmp/loki";
- };
-
- schema_config = {
- configs = [
- {
- from = "2020-05-15";
- store = "tsdb";
- object_store = "filesystem";
- schema = "v13";
- index = {
- prefix = "index_";
- period = "24h";
- };
- }
- ];
- };
-
- storage_config = {
- filesystem.directory = "/tmp/loki/chunks";
- };
- };
- };
-
fluent-bit = {
enable = true;
settings = {
@@ -165,6 +123,48 @@ in {
};
graceLimit = "1m";
};
+
+ loki = {
+ enable = true;
+ dataDir = "/var/lib/loki";
+ package = pkgs.grafana-loki;
+ configuration = {
+ auth_enabled = false;
+
+ server.http_listen_port = cfg.port;
+
+ common = {
+ ring = {
+ instance_addr = "127.0.0.1";
+ kvstore = {
+ store = "inmemory";
+ };
+ };
+
+ replication_factor = 1;
+ path_prefix = "/tmp/loki";
+ };
+
+ schema_config = {
+ configs = [
+ {
+ from = "2020-05-15";
+ store = "tsdb";
+ object_store = "filesystem";
+ schema = "v13";
+ index = {
+ prefix = "index_";
+ period = "24h";
+ };
+ }
+ ];
+ };
+
+ storage_config = {
+ filesystem.directory = "/tmp/loki/chunks";
+ };
+ };
+ };
};
};
}