2023-10-07 21:14:43 +01:00
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
config.services.victoriametrics = {
|
|
|
|
enable = true;
|
2023-10-13 02:43:03 +01:00
|
|
|
extraOptions = [ "-storage.minFreeDiskSpaceBytes=5GB" ];
|
2023-10-07 21:14:43 +01:00
|
|
|
|
|
|
|
scrapeConfigs = {
|
2023-12-29 15:11:16 +00:00
|
|
|
forgejo = {
|
|
|
|
targets = [ "127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}" ];
|
|
|
|
extraSettings.authorization.credentials_file = config.sops.secrets."forgejo/metrics-token".path;
|
2023-10-07 21:14:43 +01:00
|
|
|
};
|
|
|
|
coturn.targets = [ "127.0.0.1:9641" ];
|
2025-01-29 19:50:08 +00:00
|
|
|
|
|
|
|
crowdsec.targets =
|
|
|
|
let
|
|
|
|
address = config.security.crowdsec.settings.prometheus.listen_addr;
|
|
|
|
port = config.security.crowdsec.settings.prometheus.listen_port;
|
|
|
|
in
|
|
|
|
[ "${address}:${toString port}" ];
|
|
|
|
|
|
|
|
csFirewallBouncer.targets =
|
|
|
|
let
|
|
|
|
address =
|
|
|
|
config.security.crowdsec.remediationComponents.firewallBouncer.settings.prometheus.listen_addr;
|
|
|
|
port =
|
|
|
|
config.security.crowdsec.remediationComponents.firewallBouncer.settings.prometheus.listen_port;
|
|
|
|
in
|
|
|
|
[ "${address}:${toString port}" ];
|
2023-10-07 21:14:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|