问题描述
我查看了数据库架构,但没有发现任何相关内容.我在 /usr/share/zabbix/dashboard.php
上查看了仪表板页面的 PHP 代码,但他们使用了一些我不太明白的代码.
I've looked at the database schema, but found nothing related. I've looked at the PHP code for the dashboard page at /usr/share/zabbix/dashboard.php
, but they use some code I can't quite grasp.
例如:
CFavorite::add('web.favorite.screenids', $id, $favouriteObject)
所以,我知道它必须在某个地方将其链接到每个用户个人资料.这是配置文件表的列,但我看不到数据库中的其他位置将保留此信息.
So, I understand it has to somewhere link that to each user profile. Here are the columns for the profile table, but I can't see where else in the database this information would be kept.
mysql> describe profiles;
+-----------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------------------+------+-----+---------+-------+
| profileid | bigint(20) unsigned | NO | PRI | NULL | |
| userid | bigint(20) unsigned | NO | MUL | NULL | |
| idx | varchar(96) | NO | | | |
| idx2 | bigint(20) unsigned | NO | | 0 | |
| value_id | bigint(20) unsigned | NO | | 0 | |
| value_int | int(11) | NO | | 0 | |
| value_str | varchar(255) | NO | | | |
| source | varchar(96) | NO | | | |
| type | int(11) | NO | | 0 | |
+-----------+---------------------+------+-----+---------+-------+
推荐答案
您已经确定了正确的表格.在 https://zabbix.org/wiki/Docs/上有关于此表的部分文档DB_schema/3.4/profiles ,我刚刚添加了更多细节.
You've identified the correct table. There was partial documentation about this table at https://zabbix.org/wiki/Docs/DB_schema/3.4/profiles , I added more detail just now.
存储屏幕收藏项时有意义的字段示例:
An example of the meaningful fields when a screen favourite entry is stored:
MariaDB [zabbix]> select userid,idx,value_id,source,type from profiles
-> where idx like 'web.favorite.screenids';
+--------+------------------------+----------+----------+------+
| userid | idx | value_id | source | type |
+--------+------------------------+----------+----------+------+
| 45 | web.favorite.screenids | 16 | screenid | 1 |
+--------+------------------------+----------+----------+------+
这篇关于Zabbix 在哪里存储仪表板的收藏夹对象(地图、屏幕和图形)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!