Skip to content

Zabbix Proxy SQLite database has to be deleted as "version_repo" changes - Need help #125

@xenadmin

Description

@xenadmin

Note that with SQLite database on proxies, history data from proxies before the upgrade will be lost, because SQLite database upgrade is not supported and the SQLite database file has to be manually removed. When proxy is started for the first time and the SQLite database file is missing, proxy creates it automatically.

Source: https://www.zabbix.com/documentation/4.2/manual/installation/upgrade/packages/debian_ubuntu

All the effort I've done for this formula in the last months, was for one large project: I would like to use Saltstack. to help me lift my 30+ Zabbix Proxies from 4.0 to 4.2 and later on to 4.4.

One point I've missed during my planing, was that I have to drop/delete the Zabbix Proxy SQLite database file. I'm not fit enough with Saltstack yet, and would like to ask for help. Right now, I have no idea where to start.
I would guess I have to add some lines in "https://github.com/saltstack-formulas/zabbix-formula/blob/master/zabbix/proxy/init.sls" after line 57.

Maybe something like:
"onchanges_in pillar.version.repo execute sls.zabbix_proxy_del_sqlite -> cmd.run rm pillar.dbname + watch_in service: zabbix-proxy"

The process would have to be like this:

  1. The value of the pillar version_repo changes (onchanges?)
  2. Zabbix Proxy has to be stopped (watch?)
  3. SQLite has to be dropped (cmd.run?)
  4. New Zabbix repo has to be installed (that's already the case I guess)
  5. New Zabbix Proxy daemon has to be installed (that's already the case I guess)
  6. Zabbix Proxy daemon gets started (that's already the case I guess)
    1. New Zabbix Proxy SQLite database gets created by the daemon

May I ask for your help @hatifnatt and @aboe76 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions