On Zabbix server, connect to MariaDB by running:
mysql
And go to the correct database, e.g.:
USE zabbix;
Look up the itemid, which can be found in the URL when going to the configuration in the Zabbix web GUI. Or you can look it up by querying the database:
SELECT hostid, name FROM hosts WHERE name like '%XXX%'; -- --> <HOSTID>
SELECT itemid, name FROM items WHERE hostid = <SOMEID> and name like '%YYY%'; -- --> <ITEMID>
Then look for the values that need to be removed, e.g.
SELECT *
FROM history
WHERE itemid IN (31179, 31180, 31181, 31182)
and (clock between UNIX_TIMESTAMP("2019-10-23 19:30:00")
and UNIX_TIMESTAMP("2019-10-23 19:45:00")
);
When 100% sure which records to be removed, you can remove them by replace the SELECT *
by DELETE
.
DELETE
FROM history
WHERE itemid IN (31179, 31180, 31181, 31182)
and (clock between UNIX_TIMESTAMP("2019-10-23 19:30:00")
and UNIX_TIMESTAMP("2019-10-23 19:45:00")
);