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
|
||||
) inputs.settei.nixosConfigurations;
|
||||
in
|
||||
lib.mapAttrsToList (name: nixos: {
|
||||
lib.mapAttrsToList (
|
||||
name: nixos:
|
||||
let
|
||||
target = "${name}:${toString (nodeExporter nixos).port}";
|
||||
in
|
||||
{
|
||||
job_name = "${name}-node";
|
||||
static_configs = [ { targets = [ "${name}:${toString (nodeExporter nixos).port}" ]; } ];
|
||||
}) configurations;
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ target ];
|
||||
labels.${name} = target;
|
||||
}
|
||||
];
|
||||
}
|
||||
) configurations;
|
||||
};
|
||||
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings.server.http_port = 3030;
|
||||
settings.server = {
|
||||
http_port = 3030;
|
||||
root_url = "https://monitor.rab.lol";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue