This commit is contained in:
nora 2024-08-07 15:56:53 +02:00
parent ec7be408a1
commit d12f733cf7
23 changed files with 72 additions and 16 deletions

View file

@ -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";
};
}
];
};
};
};
}