mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44: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,13 +50,37 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.grafana.provision.datasources.settings.datasources = [
|
||||
{
|
||||
name = "Loki";
|
||||
type = "loki";
|
||||
access = "proxy";
|
||||
url = "http://localhost:${toString cfg.port}";
|
||||
}
|
||||
];
|
||||
services.grafana.provision = {
|
||||
datasources.settings.datasources = [
|
||||
{
|
||||
name = "Loki";
|
||||
type = "loki";
|
||||
access = "proxy";
|
||||
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;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue