feat(grafana): provision node-exporter dashboard

This commit is contained in:
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"; 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 = { services.grafana = {
enable = true; enable = true;
settings = { settings = {
@ -64,5 +72,37 @@
allow_assign_grafana_admin = true; 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"; job_name = "flora-6";
static_configs = [{ static_configs = [{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
labels = {
instance = "flora-6";
};
}]; }];
} }
]; ];