hosts/kazuki/prometheus: add target labels and set grafana domain
This commit is contained in:
parent
6424f8e7b1
commit
dcdc41b944
1 changed files with 19 additions and 5 deletions
|
@ -19,15 +19,29 @@
|
||||||
_: nixos: (nodeExporter nixos).enable
|
_: nixos: (nodeExporter nixos).enable
|
||||||
) inputs.settei.nixosConfigurations;
|
) inputs.settei.nixosConfigurations;
|
||||||
in
|
in
|
||||||
lib.mapAttrsToList (name: nixos: {
|
lib.mapAttrsToList (
|
||||||
job_name = "${name}-node";
|
name: nixos:
|
||||||
static_configs = [ { targets = [ "${name}:${toString (nodeExporter nixos).port}" ]; } ];
|
let
|
||||||
}) configurations;
|
target = "${name}:${toString (nodeExporter nixos).port}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
job_name = "${name}-node";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ target ];
|
||||||
|
labels.${name} = target;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
) configurations;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.server.http_port = 3030;
|
settings.server = {
|
||||||
|
http_port = 3030;
|
||||||
|
root_url = "https://monitor.rab.lol";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue