comin: Scrape metrics with alloy

This commit is contained in:
SebastianStork 2026-03-03 18:43:15 +01:00
parent 8855886547
commit 050f635b8f
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
2 changed files with 29 additions and 2 deletions

View file

@ -109,6 +109,20 @@ in
}
'';
};
"alloy/comin-metrics.alloy" = {
enable = cfg.collect.metrics.comin;
text = ''
prometheus.scrape "comin" {
targets = [{
__address__ = "localhost:${toString config.custom.services.comin.metricsPort}",
job = "comin",
instance = constants.hostname,
}]
forward_to = [prometheus.remote_write.default.receiver]
scrape_interval = "30s"
}
'';
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;