mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
grafana
This commit is contained in:
parent
ec7be408a1
commit
d12f733cf7
23 changed files with 72 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{ config, ... }: {
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
globalConfig = { };
|
||||
|
|
@ -27,6 +27,46 @@
|
|||
{ targets = [ "vps5.local:9010" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "docker-registry";
|
||||
static_configs = [
|
||||
{ targets = [ "vps1.local:9011" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
age.secrets.grafana_admin_password.file = ../../secrets/grafana_admin_password.age;
|
||||
|
||||
systemd.services.grafana.serviceConfig.EnvironmentFile = config.age.secrets.grafana_admin_password.path;
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
security = {
|
||||
admin_user = "admin";
|
||||
};
|
||||
server = {
|
||||
root_url = "https://grafana.noratrieb.dev";
|
||||
};
|
||||
};
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings = {
|
||||
apiVersion = 1;
|
||||
datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
access = "proxy";
|
||||
url = "http://vps3.local:9090";
|
||||
jsonData = {
|
||||
httpMethod = "POST";
|
||||
prometheusType = "Prometheus";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue