zabbix报警“Zabbix housekeeper processes more then 75% busy”

注:也可以修改配置文件改善,但是效果不大,彻底解决办法就是做数据表分区
Zabbix的history相关数据表数据太大,执行表分区操作过程

一、查询zabbix数据库大小

mysql> select table_schema, concat(truncate(sum(data_length)/1024/1024,2),' mb') as data_size,concat(truncate(sum(index_length)/1024/1024,2),'mb') as index_size from information_schema.tables group by table_schema order by data_size desc;
+--------------------+------------+------------+
| table_schema       | data_size  | index_size |
+--------------------+------------+------------+
| zabbix             | 8326.06 mb | 3031.85mb  |
| jumpserver         | 26.57 mb   | 8.21mb     |
| mysql              | 2.49 mb    | 0.21mb     |
| information_schema | 0.15 mb    | 0.00mb     |
| sys                | 0.01 mb    | 0.00mb     |
| performance_schema | 0.00 mb    | 0.00mb     |
+--------------------+------------+------------+
6 rows in set (0.40 sec)

**发现Zabbix数据占用了8G空间**

二、查询Zabbix数据库里所有表大小

mysql> select table_name, (data_length+index_length)/1024/1024 as total_mb,table_rows from information_schema.tables where table_schema='zabbix' order by total_mb desc;
+----------------------------+---------------+------------+
| table_name                 | total_mb      | table_rows |
+----------------------------+---------------+------------+
| history_uint               | 5487.29687500 |   56075683 |
| history                    | 4843.39062500 |   51787332 |
| trends_uint                |  526.92187500 |    7440029 |
| history_str                |  251.39062500 |    2393973 |
| trends                     |  215.87500000 |    2978883 |
| items                      |    6.21875000 |      10033 |
| events                     |    4.93750000 |       7922 |
| alerts                     |    4.67187500 |       5030 |
| items_applications         |    2.35937500 |      11510 |
| triggers                   |    1.89062500 |       4359 |
| auditlog                   |    1.85937500 |       6803 |
| images                     |    1.53125000 |        138 |
| functions                  |    0.67187500 |       4746 |
| item_discovery             |    0.57812500 |       3921 |
| graphs_items               |    0.51562500 |       3773 |
| graphs                     |    0.50000000 |       1561 |
| auditlog_details           |    0.42187500 |       2620 |
| event_recovery             |    0.32812500 |       2936 |
| applications               |    0.29687500 |       2345 |
| item_preproc               |    0.29687500 |       3668 |
| application_template       |    0.28125000 |       1989 |
| sessions                   |    0.23437500 |       1064 |
| hosts                      |    0.17187500 |    
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值