all: enable metrics from caddy

This commit is contained in:
Adithya 2024-09-14 17:57:09 +05:30
parent 1b054616a3
commit e12e49168a
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
2 changed files with 4 additions and 0 deletions

View file

@ -14,6 +14,9 @@
email = "admin@acomputer.lol"; email = "admin@acomputer.lol";
globalConfig = '' globalConfig = ''
acme_dns digitalocean {env.DO_API_TOKEN} acme_dns digitalocean {env.DO_API_TOKEN}
servers {
metrics
}
''; '';
logFormat = "level INFO"; logFormat = "level INFO";
}; };

View file

@ -3,6 +3,7 @@
caddy = { caddy = {
virtualHosts."${config.networking.hostName}.labs.adtya.xyz" = { virtualHosts."${config.networking.hostName}.labs.adtya.xyz" = {
extraConfig = '' extraConfig = ''
metrics /caddy-metrics
handle /metrics { handle /metrics {
reverse_proxy 127.0.0.1:9100 reverse_proxy 127.0.0.1:9100
} }