I solved my problem descriebed under
Menu entry "all" for Host disapears when not using Group "all" in the filter
with the following (hackish) patch:
Now I can use a group with all hosts displaying there triggers. Sorry that I'm still not providing a diff...
Andreas
Menu entry "all" for Host disapears when not using Group "all" in the filter
with the following (hackish) patch:
Code:
file tr_status.php, line ~108:
// validate_group_with_host(PERM_READ_ONLY,array("allow_all_hosts","always_select_first_host","monitored_hosts","with_monitored_items"),
validate_group_with_host(PERM_READ_ONLY,array("allow_all_hosts","monitored_hosts","with_monitored_items"),
file tr_status.php, line ~139:
$cmbHosts->AddItem(0,S_ALL_SMALL);
file tr_status.php, line ~167:
// $cmbHosts->AddItem(0,S_ALL_SMALL);
file tr_status.php, line ~30:
$join="";
if($_REQUEST["groupid"] > 0)
{
$join = " LEFT JOIN hosts_groups ON hosts_groups.hostid=h.hostid ";
$cond .= " and hosts_groups.groupid=".$_REQUEST["groupid"]." ";
}
$result = DBselect("select distinct t.triggerid,t.status,t.description,t.expression,t.priority,".
// " t.lastchange,t.comments,t.url,t.value,h.host from triggers t,hosts h,items i,functions f".
" t.lastchange,t.comments,t.url,t.value,h.host from triggers t,items i,functions f,hosts h".
$join.
" where f.itemid=i.itemid and h.hostid=i.hostid and t.triggerid=f.triggerid and t.status=".TRIGGER_STATUS_ENABLED.
" and t.description $select_cond and i.status=".ITEM_STATUS_ACTIVE.
" and ".DBid2nodeid("t.triggerid")."=".$ZBX_CURNODEID.
" and h.hostid not in (".get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_MODE_LT).") ".
" and h.status=".HOST_STATUS_MONITORED." $cond $sort");
Andreas
Comment