Working postgresql crowdsec config + remove fail2ban
Some checks are pending
/ Build Nix targets (push) Waiting to run
Some checks are pending
/ Build Nix targets (push) Waiting to run
This commit is contained in:
parent
fd8349cf91
commit
d6eb45c45a
4 changed files with 42 additions and 40 deletions
|
@ -189,7 +189,7 @@ in {
|
||||||
job_name = "jellyfin";
|
job_name = "jellyfin";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
{
|
{
|
||||||
targets = ["192.168.1.42:9100"];
|
targets = ["192.168.1.42:9002"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -256,6 +256,15 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
job_name = "crowdsec_postgresql";
|
||||||
|
metrics_path = "/metrics";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = ["192.168.1.13:6060"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
loki = {
|
loki = {
|
||||||
|
|
|
@ -45,9 +45,8 @@ in {
|
||||||
localConfig = {
|
localConfig = {
|
||||||
acquisitions = [
|
acquisitions = [
|
||||||
{
|
{
|
||||||
filenames = [
|
source = "journalctl";
|
||||||
"/var/log/postgresql/*.log"
|
journalctl_filter = [ "_SYSTEMD_UNIT=postgresql.service" ];
|
||||||
];
|
|
||||||
labels = {
|
labels = {
|
||||||
type = "syslog";
|
type = "syslog";
|
||||||
};
|
};
|
||||||
|
@ -89,6 +88,7 @@ in {
|
||||||
GRANT ALL PRIVILEGES ON DATABASE onlyoffice TO onlyoffice;
|
GRANT ALL PRIVILEGES ON DATABASE onlyoffice TO onlyoffice;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
# Stolen from https://discourse.nixos.org/t/assign-password-to-postgres-user-declaratively/9726/3
|
# Stolen from https://discourse.nixos.org/t/assign-password-to-postgres-user-declaratively/9726/3
|
||||||
# This is an awful situation
|
# This is an awful situation
|
||||||
systemd.services.postgresql.postStart = let
|
systemd.services.postgresql.postStart = let
|
||||||
|
@ -119,7 +119,6 @@ in {
|
||||||
END $$;
|
END $$;
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
networking.firewall.allowedTCPPorts = [5432];
|
networking.firewall.allowedTCPPorts = [5432];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,9 +112,6 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
fail2ban = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
crowdsec = {
|
crowdsec = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.crowdsec;
|
package = pkgs.crowdsec;
|
||||||
|
|
|
@ -99,9 +99,6 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
fail2ban = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
crowdsec = {
|
crowdsec = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.crowdsec;
|
package = pkgs.crowdsec;
|
||||||
|
|
Loading…
Add table
Reference in a new issue