M
M
mrbalearic2016-11-29 18:53:31
PostgreSQL
mrbalearic, 2016-11-29 18:53:31

Why doesn't zabbix remove old events?

Zabbix: 3.2.1, FreeBSD
DB: PostgreSQL
After updating zabbix from 3.0 to 3.2.1, a number of problems appeared:
1. It stopped writing in the "Actions" column that messages were sent (screenshot). Although everything goes as it should.
dadc67cadb024407b28156ae91f3faca.png
2. The main problem - In the last 20 events, old records hang and do not go away (which are no longer relevant at all), but the time of their last change is constantly fresh and updated. The entries are interleaved.
Actions were taken with the database:
delete FROM alerts where age(to_timestamp(alerts.clock)) > interval '50 days';
delete FROM acknowledges where age(to_timestamp(acknowledges.clock)) > interval '50 days';
delete FROM events where age(to_timestamp(events.clock)) > interval '50 days';
delete FROM history where age(to_timestamp(history.clock)) > interval '50 days';
delete FROM history_uint where age(to_timestamp(history_uint.clock)) > interval '50 days';
delete FROM history_str where age(to_timestamp(history_str.clock)) > interval '50 days';
delete FROM history_text where age(to_timestamp(history_text.clock)) > interval '50 days';
delete FROM history_log where age(to_timestamp(history_log.clock)) > interval '50 days';
delete FROM trends_uint where age(to_timestamp(trends_uint.clock)) > interval '50 days';
delete FROM trends where age(to_timestamp(trends.clock)) > interval '50 days';
Then:

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-11-30
@opium

to the question of cleaning up the database there is an excellent article on huyabbix
https://huyabbix.com/cleaning-up-zabbix-database/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question