Есть известный сработваший триггер. По нему мы можем получить группу оборудования и хост:
mysql> select groups.groupid,hosts.hostid from triggers inner join functions on triggers.triggerid=functions.triggerid inner join items on items.itemid=functions.itemid inner join hosts on hosts.hostid=items.hostid inner join hosts_groups on hosts_groups.hostid=hosts.hostid inner join groups on groups.groupid=hosts_groups.groupid where triggers.triggerid=15266;
+---------+--------+
| groupid | hostid |
+---------+--------+
| 10 | 10250 |
| 24 | 10250 |
+---------+--------+
Так-же у нас есть таблица actions, откуда мы можем взять каких пользователей и какие группы оповещать в случае проблем:
mysql> select actions.actionid,actions.name,opmessage_usr.userid,opmessage_grp.usrgrpid from opmessage inner join operations on operations.operationid=opmessage.operationid inner join actions on actions.actionid=operations.actionid left join opmessage_usr on opmessage_usr.operationid=operations.operationid left join opmessage_grp on opmessage_grp.operationid=operations.operationid left join opcommand_hst on opcommand_hst.operationid=operations.operationid left join opgroup on opgroup.operationid=operations.operationid left join opcommand_grp on opcommand_grp.operationid=operations.operationid left join optemplate on optemplate.operationid=operations.operationid left join conditions on conditions.actionid=operations.actionid limit 10;
+----------+------------------------------------------------+--------+----------+
| actionid | name | userid | usrgrpid |
+----------+------------------------------------------------+--------+----------+
| 3 | Report problems to Zabbix administrators | NULL | 7 |
| 3 | Report problems to Zabbix administrators | NULL | 7 |
| 4 | Report not supported items | NULL | 7 |
| 5 | Report not supported low level discovery rules | NULL | 7 |
| 6 | Report unknown triggers | NULL | 7 |
| 8 | Проблемы с КТВ | 3 | NULL |
| 8 | Проблемы с КТВ | 3 | NULL |
| 10 | Проблемы в уцвц | NULL | 13 |
| 10 | Проблемы в цвцув | NULL | 13 |
| 11 | Для сисадминов | NULL | 18 |
+----------+------------------------------------------------+--------+----------+
Не могу найти из какой таблицы взять данные, для того чтобы связать эти данные. Т.е. кому отправляются оповещения в случае страбатывания триггера.