about summary refs log tree commit diff
path: root/modules/nixos/monitoring/default.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-03-23 16:59:15 +0300
committerAzat Bahawi <azat@bahawi.net>2023-03-23 16:59:15 +0300
commitf6e36a699ae2d073e340e0a5844b8e111ed3de37 (patch)
tree52bb1d04e7b027165245b55622859b8425105fc7 /modules/nixos/monitoring/default.nix
parent2023-03-22 (diff)
2023-03-23
Diffstat (limited to '')
-rw-r--r--modules/nixos/monitoring/default.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/modules/nixos/monitoring/default.nix b/modules/nixos/monitoring/default.nix
index 6cdc2c9..94fff67 100644
--- a/modules/nixos/monitoring/default.nix
+++ b/modules/nixos/monitoring/default.nix
@@ -63,11 +63,10 @@ in {
 
           # https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
           dashboards.settings.providers = [
-            # The System dashboard is imported manually from here[1]. Too bad
-            # provisioned dashboards cannot properly integrate dynamic datasources
-            # yet.
-            #
-            # [1]: https://grafana.com/grafana/dashboards/1860-node-exporter-full
+            {
+              name = "node";
+              options.path = ./dashboards/node.json;
+            }
             {
               name = "endlessh";
               options.path = ./dashboards/endlessh.json;
@@ -84,6 +83,14 @@ in {
               name = "postgersql";
               options.path = ./dashboards/postgresql.json;
             }
+            {
+              name = "redis";
+              options.path = ./dashboards/redis.json;
+            }
+            {
+              name = "redis-streaming";
+              options.path = ./dashboards/redis-streaming.json;
+            }
           ];
 
           # https://grafana.com/docs/grafana/latest/administration/provisioning/#alerting
@@ -210,6 +217,13 @@ in {
             }
           ];
 
+        ruleFiles = [
+          ./rules/nginx.yaml
+          ./rules/node.yaml
+          ./rules/postgres.yaml
+          ./rules/redis.yaml
+        ];
+
         alertmanagers = [
           {
             scheme = "https";

Consider giving Nix/NixOS a try! <3