mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
service/loki: add dashboard
This commit is contained in:
parent
95394f8881
commit
e9852f6c58
2 changed files with 39 additions and 8 deletions
|
@ -50,7 +50,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.grafana.provision.datasources.settings.datasources = [
|
services.grafana.provision = {
|
||||||
|
datasources.settings.datasources = [
|
||||||
{
|
{
|
||||||
name = "Loki";
|
name = "Loki";
|
||||||
type = "loki";
|
type = "loki";
|
||||||
|
@ -58,5 +59,28 @@ in
|
||||||
url = "http://localhost:${toString cfg.port}";
|
url = "http://localhost:${toString cfg.port}";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
dashboards.settings.providers = [
|
||||||
|
{
|
||||||
|
name = "Loki";
|
||||||
|
options.path = pkgs.grafana-dashboards.loki;
|
||||||
|
disableDeletion = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.prometheus = {
|
||||||
|
scrapeConfigs = [
|
||||||
|
{
|
||||||
|
job_name = "loki";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "127.0.0.1:${toString cfg.port}" ];
|
||||||
|
labels = {
|
||||||
|
instance = config.networking.hostName;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,4 +47,11 @@ in
|
||||||
# version = "1";
|
# version = "1";
|
||||||
# hash = "sha256-MU890UAEI9wrnVIC/R0HkYwFa6mJ8Y7ESAWuaSQ8FQ8=";
|
# hash = "sha256-MU890UAEI9wrnVIC/R0HkYwFa6mJ8Y7ESAWuaSQ8FQ8=";
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
loki = buildGrafanaDashboard {
|
||||||
|
id = 14055;
|
||||||
|
pname = "loki";
|
||||||
|
version = "5";
|
||||||
|
hash = "sha256-9vfUGpypFNKm9T1F12Cqh8TIl0x3jSwv2fL9HVRLt3o=";
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue