forked from fi/nix-infra
Add metrics host with Grafana and Prometheus
This commit is contained in:
parent
b7bae9e9de
commit
d625f3f887
6 changed files with 36 additions and 10 deletions
|
|
@ -1,6 +1,19 @@
|
|||
{ ... }:
|
||||
{ hosts, ... }:
|
||||
{
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "node";
|
||||
static_configs = builtins.map (name: {
|
||||
targets = [
|
||||
"${name}.${hosts.${name}.site}.grzb.de:9100"
|
||||
];
|
||||
labels = {
|
||||
host = "${name}.${hosts.${name}.site}.grzb.de";
|
||||
};
|
||||
}) (builtins.attrNames hosts);
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue