47 lines
891 B
Nix
47 lines
891 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.prometheus = {
|
|
enable = true;
|
|
enableReload = true;
|
|
listenAddress = "[::1]";
|
|
scrapeConfigs = [
|
|
{
|
|
job_name = "prometheus";
|
|
scrape_interval = "20s";
|
|
scheme = "http";
|
|
static_configs = [
|
|
{
|
|
targets = [
|
|
"[::1]:9090"
|
|
];
|
|
}
|
|
];
|
|
}
|
|
{
|
|
job_name = "mu5001tool";
|
|
scrape_interval = "20s";
|
|
static_configs = [
|
|
{
|
|
targets = [
|
|
"[::1]:9242"
|
|
];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
|
|
services.nginx = {
|
|
virtualHosts = {
|
|
"prometheus.astatine.net.clerie.de" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
basicAuthFile = config.sops.secrets.monitoring-htpasswd.path;
|
|
locations."/".proxyPass = "http://[::1]:9090/";
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|