Zabbix postgresql growing too large

|0|/var/lib/pgsql/data/pg_xlog/archive_status|
|---|---|
|129M|/var/lib/pgsql/data/pg_xlog|
|456K|/var/lib/pgsql/data/global|
|32M|/var/lib/pgsql/data/pg_clog|
|8.0K|/var/lib/pgsql/data/pg_notify|
|0|/var/lib/pgsql/data/pg_serial|
|0|/var/lib/pgsql/data/pg_snapshots|
|160K|/var/lib/pgsql/data/pg_subtrans|
|0|/var/lib/pgsql/data/pg_twophase|
|8.0K|/var/lib/pgsql/data/pg_multixact/members|
|8.0K|/var/lib/pgsql/data/pg_multixact/offsets|
|16K|/var/lib/pgsql/data/pg_multixact|
|6.3M|/var/lib/pgsql/data/base/1|
|6.3M|/var/lib/pgsql/data/base/12921|
|6.4M|/var/lib/pgsql/data/base/12926|
|103G|/var/lib/pgsql/data/base/16385|
|0|/var/lib/pgsql/data/base/pgsql_tmp|
|103G|/var/lib/pgsql/data/base|
|0|/var/lib/pgsql/data/pg_tblspc|
|52K|/var/lib/pgsql/data/pg_stat_tmp|
|12K|/var/lib/pgsql/data/pg_log|
|9.1M|/var/lib/pgsql/data/zabbiximages|
|103G|/var/lib/pgsql/data|

my database of zabbix is growing too large, I noticed that my VM is taking more and more place in DB, how do you trade on it, can we think to patch the @mrmarkuz to fix this ?

Removing old history data would be a way:

It’s an old issue, here are some good advices:

https://www.zabbix.com/forum/zabbix-help/436144-zabbix-database-growing-fast?p=436279#post436279

Maybe we can also optimize the housekeeping settings?

2 Likes

I try the housekeeping set to 90days, not easy to find, quite hidden menu

1 Like

https://www.zabbix.com/forum/zabbix-help/35054-force-housekeeper-on-hudge-db

[root@zabbix ~]# zabbix_server -c /etc/zabbix/zabbix_server.conf -R housekeeper_execute

1 Like

@stephdl

Salut Stéphane

The Link you provided is 10 years old, the Version of Zabbix is 2.x, and the used Database at the time seems to be “Hudge-DB”…

Today, MySQL or PostgreSQL are being used!

Be careful!

I do have a more or less working script for this, though!
I can provide the code and reasoning behind it, if you want.

And also good to know:

My 2 cents
Andy

2 Likes

yes please we could add it to the wiki or think to add them inside the rpm

the sql script you gave is a screenshot and I am too lazzy to rewrite them :smiley:

@stephdl

Salut Stéphane

I’ll provide you the link to the files on my Nextcloud as a PM within the next hour - I need to check if the “master” copy was moved to my newer Macbook…

But I still have it on some storage - and in the root folder of my NethServer.

I’d be glad if you, as a achieved and respected coder, could into look into the (commented!) code and provide feedback / improvement.

My 2 cents
Andy

1 Like