@@ -60,20 +60,20 @@ in
|
||||
|
||||
prometheus-podman-exporter.containerConfig = {
|
||||
image = "docker-archive:${selfPkgs.docker-prometheus-podman-exporter}";
|
||||
publishPorts = [ "9882:9882" ];
|
||||
publishPorts = [ "9882:9882/tcp" ];
|
||||
volumes = [ "/run/podman/podman.sock:/run/podman/podman.sock:ro" ];
|
||||
exec = [ "--collector.enable-all" ];
|
||||
};
|
||||
|
||||
prometheus-fail2ban-exporter.containerConfig = {
|
||||
image = "docker-archive:${selfPkgs.docker-prometheus-fail2ban-exporter}";
|
||||
publishPorts = [ "9191:9191" ];
|
||||
publishPorts = [ "9191:9191/tcp" ];
|
||||
volumes = [ "/run/fail2ban/fail2ban.sock:/var/run/fail2ban/fail2ban.sock:ro" ];
|
||||
};
|
||||
|
||||
prometheus-smartctl-exporter.containerConfig = {
|
||||
image = "docker-archive:${selfPkgs.docker-prometheus-smartctl-exporter}";
|
||||
publishPorts = [ "9633:9633" ];
|
||||
publishPorts = [ "9633:9633/tcp" ];
|
||||
podmanArgs = [ "--privileged" ];
|
||||
};
|
||||
};
|
||||
@@ -120,7 +120,7 @@ in
|
||||
|
||||
prometheus-init =
|
||||
let
|
||||
prometheusConfig = (pkgs.formats.yaml { }).generate "prometheus.yml" {
|
||||
prometheusConfig = (pkgs.formats.yaml { }).generate "prometheus.yaml" {
|
||||
global.scrape_interval = "15s";
|
||||
|
||||
scrape_configs =
|
||||
@@ -242,12 +242,12 @@ in
|
||||
image = "docker-archive:${selfPkgs.docker-yq}";
|
||||
volumes = [
|
||||
"${volumes.prometheus-config.ref}:/etc/prometheus"
|
||||
"${prometheusConfig}:/etc/prometheus/conf.d/prometheus.yml"
|
||||
"${prometheusConfig}:/etc/prometheus/conf.d/prometheus.yaml"
|
||||
];
|
||||
entrypoint = "/bin/bash";
|
||||
exec = [
|
||||
"-c"
|
||||
"yq eval-all '. as $item ireduce ({}; . *+ $item)' /etc/prometheus/conf.d/*.yml > /etc/prometheus/prometheus.yml"
|
||||
"yq eval-all '. as $item ireduce ({}; . *+ $item)' /etc/prometheus/conf.d/*.yaml > /etc/prometheus/prometheus.yaml"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -272,7 +272,7 @@ in
|
||||
];
|
||||
exec = [
|
||||
"--log.level=debug"
|
||||
"--config.file=/etc/prometheus/prometheus.yml"
|
||||
"--config.file=/etc/prometheus/prometheus.yaml"
|
||||
"--storage.tsdb.path=/var/lib/prometheus"
|
||||
"--storage.tsdb.retention.time=1y"
|
||||
];
|
||||
|
Reference in New Issue
Block a user