rico0: https for prometheus

This commit is contained in:
Adithya 2024-07-17 11:18:33 +05:30
parent 643ae6cce3
commit 16143e92bb
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
2 changed files with 29 additions and 17 deletions

View file

@ -42,6 +42,7 @@ _: {
filterUnmappedTypes = true;
mapping = {
"frp.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
"prometheus.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
"transmission.labs.adtya.xyz" = "10.10.10.14,fd7c:585c:c4ae::14";
};
};

View file

@ -1,12 +1,22 @@
_: {
services.prometheus = {
services = {
caddy = {
virtualHosts."prometheus.labs.adtya.xyz" = {
extraConfig = ''
reverse_proxy 127.0.0.1:9090
tls /persist/secrets/caddy/certs/prometheus.crt /persist/secrets/caddy/certs/prometheus.key
'';
};
};
prometheus = {
enable = true;
listenAddress = "10.10.10.10";
listenAddress = "127.0.0.1";
scrapeConfigs = [
{
job_name = "frp";
scheme = "https";
static_configs = [
{ targets = [ "10.10.10.1:7500" ]; }
{ targets = [ "frp.labs.adtya.xyz" ]; }
];
}
{
@ -17,4 +27,5 @@ _: {
}
];
};
};
}