updated zabbix server to 7.0
This commit is contained in:
parent
5eab622ed1
commit
26d93df174
1 changed files with 26 additions and 22 deletions
|
|
@ -1,37 +1,39 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
cfg = import ./vars.nix;
|
cfg = import ./vars.nix;
|
||||||
db = cfg.zabbix.db;
|
db = cfg.zabbix.db;
|
||||||
db_host = cfg.podman.hostIP;
|
db_host = cfg.podman.hostIP;
|
||||||
|
dbport = cfg.zabbix.dbport;
|
||||||
port = cfg.zabbix.port;
|
port = cfg.zabbix.port;
|
||||||
domain = cfg.zabbix.domain;
|
domain = cfg.zabbix.domain;
|
||||||
server_ip = "10.88.1.0";
|
server_ip = "10.88.1.0";
|
||||||
web_ip = "10.88.1.1";
|
web_ip = "10.88.1.1";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.postgresql = {
|
|
||||||
ensureDatabases = [ db ];
|
imports = [
|
||||||
ensureUsers = [
|
./podman-postgresql.nix # for the database
|
||||||
{
|
#./podman.nix
|
||||||
name = db;
|
./nginx.nix # for the webserver
|
||||||
ensurePermissions = {
|
];
|
||||||
"DATABASE ${db}" = "ALL PRIVILEGES";
|
|
||||||
};
|
sops.secrets."zabbix/db" = {};
|
||||||
}
|
|
||||||
];
|
services.podman-postgresql."zabbix" = {
|
||||||
extraPlugins = [
|
enable = true;
|
||||||
(pkgs.callPackage ../packages/timescaledb/timescaledb.nix {})
|
image = "docker.io/timescale/timescaledb:2.15.3-pg14";
|
||||||
];
|
port = (lib.strings.toInt dbport);
|
||||||
settings = {
|
passwordFile = config.sops.secrets."zabbix/db".path;
|
||||||
shared_preload_libraries = "timescaledb";
|
backupInterval = "daily";
|
||||||
};
|
backupRetention = 2;
|
||||||
authentication = "host ${db} ${db} 10.88.0.0/16 md5";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.zabbix-server = {
|
virtualisation.oci-containers.containers.zabbix-server = {
|
||||||
image = "docker.io/zabbix/zabbix-server-pgsql:alpine-6.4-latest";
|
image = "docker.io/zabbix/zabbix-server-pgsql:alpine-7.0-latest";
|
||||||
environment = {
|
environment = {
|
||||||
DB_SERVER_HOST = db_host;
|
#DB_SERVER_HOST = db_host;
|
||||||
|
DB_SERVER_HOST = "10.88.0.1";
|
||||||
|
DB_SERVER_PORT = dbport;
|
||||||
POSTGRES_USER = db;
|
POSTGRES_USER = db;
|
||||||
TZ = "Europe/Berlin";
|
TZ = "Europe/Berlin";
|
||||||
};
|
};
|
||||||
|
|
@ -40,9 +42,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.zabbix-web = {
|
virtualisation.oci-containers.containers.zabbix-web = {
|
||||||
image = "docker.io/zabbix/zabbix-web-nginx-pgsql:alpine-6.4-latest";
|
image = "docker.io/zabbix/zabbix-web-nginx-pgsql:alpine-7.0-latest";
|
||||||
environment = {
|
environment = {
|
||||||
DB_SERVER_HOST = db_host;
|
#DB_SERVER_HOST = db_host;
|
||||||
|
DB_SERVER_HOST = "10.88.0.1";
|
||||||
|
DB_SERVER_PORT = dbport;
|
||||||
POSTGRES_USER = db;
|
POSTGRES_USER = db;
|
||||||
ZBX_SERVER_HOST = server_ip;
|
ZBX_SERVER_HOST = server_ip;
|
||||||
ZBX_SERVER_NAME = "Superbly Managed Networks and Hosting";
|
ZBX_SERVER_NAME = "Superbly Managed Networks and Hosting";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue