Zabbix cleaning history_uint table efficently

For some reason my Zabbix history_uint table has grown to 25GB and 293 million rows.  The zabbix housekeeping process isn't keeping up, which is understandable since it deletes rows one at a time.  The history_uint table has only one index on the combination of (itemid,clock) so if you try to delete based on those separately (like delete all rows older than a certain timestamp), you end up with a sequential scan of all 293 million rows.  To get around this we delete things in batch, using a temp table to hold each batch.


Zabbix Agent Debian Enhancements

Here are some extra UserParameters that I have found useful to add to my Debian systems for Zabbix Monitoring.

The first allows the agent to return the version of Debian that the system is currently running, so if you want to see what all your systems are running at once.  It just cats the contents of /etc/debian_version.

Subscribe to RSS - Zabbix