summaryrefslogtreecommitdiffstats
path: root/frontends/php/queue.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/queue.php')
-rw-r--r--frontends/php/queue.php42
1 files changed, 25 insertions, 17 deletions
diff --git a/frontends/php/queue.php b/frontends/php/queue.php
index 5320a9b4..1ca91ef6 100644
--- a/frontends/php/queue.php
+++ b/frontends/php/queue.php
@@ -70,18 +70,21 @@ include_once "include/page_header.php";
//ITEM_TYPE_HTTPTEST,
ITEM_TYPE_EXTERNAL);
- $result = DBselect("select i.itemid,i.nextcheck,i.description,i.key_,i.type,h.host,h.hostid ".
- " from items i,hosts h ".
- " where i.status=".ITEM_STATUS_ACTIVE." and i.type in (".implode(',',$item_types).") ".
- " and ((h.status=".HOST_STATUS_MONITORED." and h.available != ".HOST_AVAILABLE_FALSE.") ".
- " or (h.status=".HOST_STATUS_MONITORED." and h.available=".HOST_AVAILABLE_FALSE." and h.disable_until<=$now)) ".
- " and i.hostid=h.hostid and i.nextcheck<$now and i.key_ not in ('status','icmpping','icmppingsec','zabbix[log]') ".
- " and i.value_type not in (".ITEM_VALUE_TYPE_LOG.") ".
- " and h.hostid in (".get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,get_current_nodeid()).")".
-// " and h.hostid in (".get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,$ZBX_LOCALNODEID).")".
-// " and ".DBin_node('h.hostid', $ZBX_LOCALNODEID).
- " and ".DBin_node('h.hostid', get_current_nodeid()).
- " order by i.nextcheck,h.host,i.description,i.key_");
+ $result = DBselect('SELECT i.itemid,i.nextcheck,i.description,i.key_,i.type,h.host,h.hostid '.
+ ' FROM items i,hosts h '.
+ ' WHERE i.status='.ITEM_STATUS_ACTIVE.
+ ' AND i.type in ('.implode(',',$item_types).') '.
+ ' AND ((h.status='.HOST_STATUS_MONITORED.' AND h.available != '.HOST_AVAILABLE_FALSE.') '.
+ ' or (h.status='.HOST_STATUS_MONITORED.' AND h.available='.HOST_AVAILABLE_FALSE.' AND h.disable_until<='.$now.')) '.
+ ' AND i.hostid=h.hostid '.
+ ' AND i.nextcheck<'.$now.
+ " AND i.key_ not in ('status','icmpping','icmppingsec','zabbix[log]') ".
+ ' AND i.value_type not in ('.ITEM_VALUE_TYPE_LOG.') '.
+ ' AND h.hostid in ('.get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,get_current_nodeid()).')'.
+// ' AND h.hostid in ('.get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,$ZBX_LOCALNODEID).')'.
+// ' AND '.DBin_node('h.hostid', $ZBX_LOCALNODEID).
+ ' AND '.DBin_node('h.hostid', get_current_nodeid()).
+ ' order by i.nextcheck,h.host,i.description,i.key_');
$table = new CTableInfo(S_THE_QUEUE_IS_EMPTY);
@@ -111,11 +114,16 @@ include_once "include/page_header.php";
$table->setHeader(array(S_ITEMS,S_5_SECONDS,S_10_SECONDS,S_30_SECONDS,S_1_MINUTE,S_5_MINUTES,S_MORE_THAN_5_MINUTES));
foreach($item_types as $type)
{
- $elements=array(item_type2str($type),$sec_5[$type],$sec_10[$type],
- new CCol($sec_30[$type],"warning"),
- new CCol($sec_60[$type],"average"),
- new CCol($sec_300[$type],"high"),
- new CCol($sec_rest[$type],"disaster"));
+ $elements=array(
+ item_type2str($type),
+ new CCol($sec_5[$type],($sec_5[$type])?"unknown_trigger":"normal"),
+ new CCol($sec_10[$type],($sec_10[$type])?"information":"normal"),
+ new CCol($sec_30[$type],($sec_30[$type])?"warning":"normal"),
+ new CCol($sec_60[$type],($sec_60[$type])?"average":"normal"),
+ new CCol($sec_300[$type],($sec_300[$type])?"high":"normal"),
+ new CCol($sec_rest[$type],($sec_rest[$type])?"disaster":"normal")
+ );
+
$table->addRow($elements);
}
}