fixup! Loki: add prometheus

This commit is contained in:
Filippo Berto 2024-07-23 09:32:47 +02:00
parent ce2d3064a9
commit ee26dda42a
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056

View file

@ -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<Wrapped>[^ /]*) (?P<Args>.*)" ]; }
# ];
# };
# 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<Wrapped>[^ /]*) (?P<Args>.*)" ]; }
# ];
# };
# 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