about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-05-12 14:48:50 -0700
committerFranck Cuny <franck@fcuny.net>2023-05-12 14:48:50 -0700
commit21d405ab09a6f79a0eabab8e62d940e0704a57b6 (patch)
tree2dc89cc7cc5e2a8e96c7e7d58aad5e7e988a058e /modules/services
parentprofiles/monitoring: move node exporter to a profile (diff)
downloadworld-21d405ab09a6f79a0eabab8e62d940e0704a57b6.tar.gz
profiles/monitoring: move promtail to a profile
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/monitoring/default.nix1
-rw-r--r--modules/services/monitoring/promtail.nix65
2 files changed, 0 insertions, 66 deletions
diff --git a/modules/services/monitoring/default.nix b/modules/services/monitoring/default.nix
index fe1e219..32866cb 100644
--- a/modules/services/monitoring/default.nix
+++ b/modules/services/monitoring/default.nix
@@ -7,6 +7,5 @@ in
     ./grafana.nix
     ./loki.nix
     ./prometheus.nix
-    ./promtail.nix
   ];
 }
diff --git a/modules/services/monitoring/promtail.nix b/modules/services/monitoring/promtail.nix
deleted file mode 100644
index 85d34dc..0000000
--- a/modules/services/monitoring/promtail.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
-  cfg = config.my.services.monitoring.promtail;
-in
-{
-  options.my.services.monitoring.promtail = with lib; {
-    enable = mkEnableOption "promtail logs exporter";
-  };
-
-  config = lib.mkIf cfg.enable {
-    services.promtail = {
-      enable = true;
-      configuration = {
-        clients = [{ url = "http://192.168.6.40:3100/loki/api/v1/push"; }];
-        scrape_configs = [
-          {
-            job_name = "journal";
-            journal = {
-              json = true;
-              path = "/var/log/journal";
-              max_age = "12h";
-              labels = {
-                host = config.networking.hostName;
-                job = "journal";
-                "__path__" = "/var/log/journal";
-              };
-            };
-
-            relabel_configs = [
-              {
-                source_labels = [ "__journal__systemd_unit" ];
-                target_label = "unit";
-              }
-              {
-                source_labels = [ "__journal_priority" ];
-                target_label = "priority";
-              }
-              {
-                source_labels = [ "__journal_syslog_identifier" ];
-                target_label = "syslog_id";
-              }
-            ];
-          }
-
-          {
-            job_name = "nginx";
-            static_configs = [{
-              labels = {
-                host = config.networking.hostName;
-                job = "nginx";
-                __path__ = "/var/log/nginx/*";
-              };
-            }];
-          }
-        ];
-
-        server = {
-          http_listen_port = 9832;
-          http_path_prefix = "/promtail";
-          grpc_listen_port = 0;
-        };
-      };
-    };
-  };
-}