vueko: Expose rspamd prometheus metrics

This commit is contained in:
Simon Bruder 2023-04-30 13:09:43 +02:00
parent 0d3ec89038
commit 687439cff9
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 18 additions and 0 deletions

View file

@ -110,6 +110,15 @@ in
job_name = "co2"; job_name = "co2";
static_configs = mkStaticTarget "fuuko.vpn.sbruder.de:9672"; static_configs = mkStaticTarget "fuuko.vpn.sbruder.de:9672";
} }
{
job_name = "rspamd";
static_configs = mkStaticTarget "vueko.vpn.sbruder.de";
metrics_path = "/rspamd/metrics";
relabel_configs = lib.singleton {
target_label = "instance";
replacement = "vueko.sbruder.de";
};
}
]; ];
rules = rules =

View file

@ -56,6 +56,15 @@
locations."/rspamd/".proxyPass = "http://127.0.0.1:11334/"; locations."/rspamd/".proxyPass = "http://127.0.0.1:11334/";
}; };
"vueko.vpn.sbruder.de" = {
# Allow prometheus metrics to be fetched from VPN without authentication
locations."/rspamd/metrics" = {
proxyPass = "http://127.0.0.1:11334/metrics";
extraConfig = ''
proxy_set_header X-Forwarded-For 127.0.0.1;
'';
};
};
"dav.sbruder.de" = { "dav.sbruder.de" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;