feat(grafana): provision node-exporter dashboard

pull/77/head
teutat3s 2023-12-05 13:52:39 +01:00
parent 6b15d72d85
commit 0e290f080e
Signed by: teutat3s
GPG Key ID: 4FA1D3FA524F22C1
3 changed files with 23864 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,14 @@
owner = "grafana";
};
environment.etc = {
"grafana-dashboards/node-exporter-full_rev33.json" = {
source = ./grafana-dashboards/node-exporter-full_rev33.json;
group = "grafana";
user = "grafana";
};
};
services.grafana = {
enable = true;
settings = {
@ -64,5 +72,37 @@
allow_assign_grafana_admin = true;
};
};
provision = {
enable = true;
datasources = {
settings = {
datasources = [
{
name = "Prometheus";
type = "prometheus";
access = "proxy";
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
isDefault = true;
}
{
name = "Loki";
type = "loki";
access = "proxy";
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}";
}
];
};
};
dashboards = {
settings = {
providers = [
{
name = "pub.solar Dashboards";
options.path = "/etc/grafana-dashboards";
}
];
};
};
};
};
}

View File

@ -20,6 +20,9 @@
job_name = "flora-6";
static_configs = [{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
labels = {
instance = "flora-6";
};
}];
}
];