From ce2d3064a946c2deff973ec9e33865c1e6aaae8b Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Tue, 23 Jul 2024 09:28:04 +0200 Subject: [PATCH] fixup! Loki: add prometheus --- instances/loki/configuration.nix | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/instances/loki/configuration.nix b/instances/loki/configuration.nix index c616ba5..f011072 100644 --- a/instances/loki/configuration.nix +++ b/instances/loki/configuration.nix @@ -470,27 +470,27 @@ in ]; }; - servies.prometheus = { - enable = true; - exporters = { - node = { enable = true; enabledCollectors = [ "systemd" ]; }; - process = { - enable = true; - settings.process_names = [ - # Remove nix store path from process name - { name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; } - ]; - }; - systemd.enable = true; - }; - globalConfig = { scrape_interval = "10s"; }; - scrapeConfigs = [ - { job_name = "node"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; } - { job_name = "process"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; }]; } - { job_name = "systemd"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }]; } - ]; - retentionTime = "15d"; - }; + # servies.prometheus = { + # enable = true; + # exporters = { + # node = { enable = true; enabledCollectors = [ "systemd" ]; }; + # process = { + # enable = true; + # settings.process_names = [ + # # Remove nix store path from process name + # { name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; } + # ]; + # }; + # systemd.enable = true; + # }; + # globalConfig = { scrape_interval = "10s"; }; + # scrapeConfigs = [ + # { job_name = "node"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; } + # { job_name = "process"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; }]; } + # { job_name = "systemd"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }]; } + # ]; + # retentionTime = "15d"; + # }; security.sudo.extraConfig = '' Defaults pwfeedback