zabbix server role

Important: if the database location is not localhost, you will have to install postgresql on the correct host before running this role. You will need the following variables in the database host:

pg_users:
  - name: zabbix
    password: auto
    attrib: LOGIN

pg_databases:
  - name: zabbix
    owner: zabbix
    conn_limit: 100
    extension_list:
      - name: timescaledb
        version: 2.19.3

pg_shared_preload_libraries:
  - timescaledb

The version of timescaledb in particular is very important: the version is marked for hold to avoid any update. It must be specified with the complete version (X.Y.Z).

Mandatory variable

Variable Description Type of variable Example value
zabbix_version self-explanatory string 7.4
zabbix_server_DBHost where is the database, use localhost for local, which has special settings string localhost

Optional variables

Variable Description Type of variable Default value Example valur
zabbix_server_DBPassword database password string {{ lookup('hashi_vault', 'secret=cosium-kv/data/' + host_vars_location + '/' + ansible_hostname)['postgres_user_zabbix_password'] }}
zabbix_server_alertscripts list of alertscript to add, current scripts that can be activated: jira, matrix, msteam list undefined [ "jira", "matrix" ]
You can define any additional configuration settings using this dictonnary:
zabbix_server_addional_config:
  StartPollers: 300
  StartIPMIPollers: 10
  AlertScriptsPath: "/etc/zabbix/alertscripts"

This role overrides the default values about the communication between a zabbix server and a passive zabbix proxy. By default, the server update the configuration on passive proxies only every hours, which is not convenient. It also query the proxy every single seconds. This role changes those value to 15 minutes and 5 seconds, respectively. You can modify those value by changing those variables:

zabbix_server_ProxyConfigFrequency: "900"
zabbix_server_ProxyDataFrequency: "5"

Those settings have no effect on active proxies.