mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
system/docker: enable monitoring
This commit is contained in:
parent
dc7c6bce75
commit
f8bb1d0886
2 changed files with 35 additions and 0 deletions
|
@ -18,5 +18,33 @@ in
|
|||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
};
|
||||
|
||||
services.cadvisor.enable = config.services.prometheus.enable;
|
||||
|
||||
services.prometheus = {
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "docker";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:${toString config.services.cadvisor.port}" ];
|
||||
labels = {
|
||||
instance = config.networking.hostName;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
# dashboard untested
|
||||
services.grafana.provision = {
|
||||
dashboards.settings.providers = [
|
||||
{
|
||||
name = "Docker";
|
||||
options.path = pkgs.grafana-dashboards.cadvisor;
|
||||
disableDeletion = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue