add unbound dashboard

This commit is contained in:
Henry Hiles 2026-05-27 20:38:28 -04:00
commit e4c76db648
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
3 changed files with 28 additions and 2 deletions

View file

@ -168,13 +168,21 @@ in
dashboards.settings.providers = [
{
name = "Node exporter";
name = "Node Exporter";
options.path = pkgs.fetchurl {
name = "dashboard-node-exporter-full.json";
url = "https://grafana.com/api/dashboards/1860/revisions/42/download";
hash = "sha256-pNgn6xgZBEu6LW0lc0cXX2gRkQ8lg/rer34SPE3yEl4=";
};
}
{
name = "Unbound Info";
options.path = pkgs.fetchurl {
name = "unbound-info.json";
url = "https://github.com/rfmoz/grafana-dashboards/raw/refs/heads/master/prometheus/unbound-full.json";
hash = "sha256-It6MNTaJyVXf5LvE55Bl20ij+Fxh1NWbsosXoLkpamM=";
};
}
{
name = "Caddy Hosts";
options.path = pkgs.stdenv.mkDerivation {

View file

@ -4,7 +4,7 @@
enable = true;
listenAddress = "127.0.0.7";
globalConfig.scrape_interval = "3s";
globalConfig.scrape_interval = "10s";
scrapeConfigs = [
{
job_name = "node";
@ -16,6 +16,16 @@
}
];
}
{
job_name = "unbound";
static_configs = [
{
targets = with config.services.prometheus.exporters.unbound; [
"${listenAddress}:${toString port}"
];
}
];
}
{
job_name = "caddy";
static_configs = [
@ -33,6 +43,12 @@
"processes"
];
};
unbound = {
enable = true;
listenAddress = "127.0.0.5";
unbound.host = "unix://${config.services.unbound.localControlSocketPath}";
group = config.services.unbound.group;
};
};
};
}

View file

@ -1,8 +1,10 @@
{
services.unbound = {
enable = true;
localControlSocketPath = "/run/unbound/control.sock";
settings = {
server = {
extended-statistics = true;
rrset-cache-size = "64M";
msg-cache-size = "64M";
discard-timeout = 4800;