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-04-01 04:39:59 +0300
committerAzat Bahawi <azat@bahawi.net>2023-04-01 04:39:59 +0300
commitf4145939712b0046e5d57906d4b157b8a150614d (patch)
tree3c8d24db6410692e0fa59570ff698d446ae5a96e /modules/nixos/monitoring/default.nix
parent2023-03-23 (diff)
2023-04-01
Diffstat (limited to '')
-rw-r--r--modules/nixos/monitoring/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/modules/nixos/monitoring/default.nix b/modules/nixos/monitoring/default.nix
index 94fff67..6f74e9f 100644
--- a/modules/nixos/monitoring/default.nix
+++ b/modules/nixos/monitoring/default.nix
@@ -60,6 +60,12 @@ in {
               jsonData.client = "standalone";
             })
           ];
+          datasources.settings.deleteDatasources = [
+            {
+              name = "PostgreSQL";
+              orgId = 1;
+            }
+          ];
 
           # https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
           dashboards.settings.providers = [
@@ -68,6 +74,10 @@ in {
               options.path = ./dashboards/node.json;
             }
             {
+              name = "ntfy";
+              options.path = ./dashboards/ntfy.json;
+            }
+            {
               name = "endlessh";
               options.path = ./dashboards/endlessh.json;
             }
@@ -120,6 +130,43 @@ in {
           with my.configurations;
           with config.services.prometheus.exporters; [
             {
+              job_name = "promtail";
+              static_configs = [
+                {
+                  targets =
+                    mkTargets [
+                      manwe
+                      varda
+                      yavanna
+                    ]
+                    config.nixfiles.modules.promtail.port;
+                }
+              ];
+            }
+            {
+              job_name = "ntfy";
+              static_configs = [
+                {
+                  targets =
+                    mkTargets
+                    [
+                      manwe
+                    ]
+                    config.nixfiles.modules.ntfy.port;
+                }
+              ];
+            }
+            {
+              job_name = "soju";
+              static_configs = [
+                {
+                  targets = [
+                    "127.0.0.1:${toString config.nixfiles.modules.soju.prometheus.port}"
+                  ];
+                }
+              ];
+            }
+            {
               job_name = "endlessh-go";
               static_configs = [
                 {

Consider giving Nix/NixOS a try! <3