fuuko: Add dnsmasq prometheus exporter

This commit is contained in:
Simon Bruder 2021-04-05 13:18:43 +02:00
parent 6f20d6300d
commit 5c4284d68c
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 14 additions and 0 deletions

View file

@ -24,6 +24,12 @@
]; ];
}; };
services.prometheus.exporters.dnsmasq = {
enable = true;
listenAddress = "127.0.0.1";
leasesPath = "/var/lib/dnsmasq/dnsmasq.leases";
};
services.stubby = { services.stubby = {
enable = true; enable = true;
listenAddresses = [ listenAddresses = [

View file

@ -111,6 +111,14 @@ in
replacement = "ci.sbruder.de"; replacement = "ci.sbruder.de";
}; };
} }
{
job_name = "dnsmasq";
static_configs = mkStaticTarget (with config.services.prometheus.exporters.dnsmasq; "${listenAddress}:${toString port}");
relabel_configs = lib.singleton {
target_label = "instance";
replacement = "fuuko.home.sbruder.de";
};
}
]; ];
rules = rules =