在使用 zabbix 3.0.4
界面上 last 20 issuus 沒掉了,查了很久,沒有發現具體在哪裡配置,最後想到直接查zabbix源碼,把東西調出來
找到
先找到哪裡控制顯示的:app/views/monitoring.dashboard.view.php
foreach ($widgets as $widgetid => $widget) {
$profile = 'web.dashboard.widget.'.$widgetid;
$rate = CProfile::get($profile.'.rf_rate', 60);
$expanded = (bool) CProfile::get($profile.'.state', true);
$col = CProfile::get($profile.'.col', $widget['defaults']['col']);
$row = CProfile::get($profile.'.row', $widget['defaults']['row']);
這裡說,在CProfile裡面拿到一個開關,長寬;感覺這個就是在資料庫裡面拿的,順着查下去
找到include/classes/user/CProfile.php;CProfile這個類就是在MySQL裡面profiles表拉配置資料
找了其他的使用者看,發現自己的賬号缺少了這麼一行,profileid是zabbix程式裡面控制自增的,userid 表示自己的使用者id
select * from profiles where userid=1 and idx like 'web.dashboard.widget.lastiss%%' ;
+-----------+--------+------------------------------------+----------+----------+-----------+----------------+--------+------+
| profileid | userid | idx | idx2 | value_id | value_int | value_str | source | type |
+-----------+--------+------------------------------------+----------+----------+-----------+----------------+--------+------+
| 101809 | 1 | web.dashboard.widget.lastiss.state | 0 | 0 | 1 | | | 2 |
+-----------+--------+------------------------------------+----------+----------+-----------+----------------+--------+------+
看着這個就是開關,直接人工insert一句
insert into profiles ( profileid,userid,idx,value_int,type) values (101809, 1, 'web.dashboard.widget.lastiss.state', 1,2)
重新整理還是不行
又想了下,這個col,row, 就是在這個widget所在行列都是資料庫裡面控制的,如果widget的行列沖突了會發生什麼?會不會顯示不出來?
随意移動了一下頁面上的widget,确定沒有沖突
重新整理一下,問題解決。。