summaryrefslogtreecommitdiffstats
path: root/frontends/php/latest.php
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-09-14 11:06:27 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-09-14 11:06:27 +0000
commit8755f9643aba3cffc5320321618fbe8e7b78b73b (patch)
tree61f79790fee2222b1d3c5c3cd3faf09c9de8f168 /frontends/php/latest.php
parent220a18752f8fefdd0af90ccd17cc045c2e6ae1a6 (diff)
downloadzabbix-8755f9643aba3cffc5320321618fbe8e7b78b73b.tar.gz
zabbix-8755f9643aba3cffc5320321618fbe8e7b78b73b.tar.xz
zabbix-8755f9643aba3cffc5320321618fbe8e7b78b73b.zip
Initial integration of distributed monitoring.
Changes 3196:HEAD of branches/distributed git-svn-id: svn://svn.zabbix.com/trunk@3306 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/latest.php')
-rw-r--r--frontends/php/latest.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/frontends/php/latest.php b/frontends/php/latest.php
index 6eeb3c41..ade690f8 100644
--- a/frontends/php/latest.php
+++ b/frontends/php/latest.php
@@ -150,7 +150,7 @@
$cmbGroup = new CComboBox("groupid",$_REQUEST["groupid"],"submit()");
$cmbGroup->AddItem(0,S_ALL_SMALL);
- $result=DBselect("select groupid,name from groups order by name");
+ $result=DBselect("select groupid,name from groups where mod(groupid,100)=$ZBX_CURNODEID order by name");
while($row=DBfetch($result))
{
// Check if at least one host with read permission exists for this group
@@ -180,7 +180,9 @@
{
$cmbHosts->AddItem(0,S_ALL_SMALL);
$sql="select h.hostid,h.host from hosts h,items i where h.status=".HOST_STATUS_MONITORED.
- " and i.status=".ITEM_STATUS_ACTIVE." and h.hostid=i.hostid group by h.hostid,h.host order by h.host";
+ " and i.status=".ITEM_STATUS_ACTIVE." and h.hostid=i.hostid".
+ " and mod(h.hostid,100)=".$ZBX_CURNODEID.
+ " group by h.hostid,h.host order by h.host";
}
$result=DBselect($sql);
$first_hostid = -1;
@@ -247,6 +249,7 @@
$any_app_exist = false;
$db_applications = DBselect("select h.host,h.hostid,a.* from applications a,hosts h where a.hostid=h.hostid".$compare_host.
+ " and mod(h.hostid,100)=".$ZBX_CURNODEID.
" order by a.name,a.applicationid,h.host");
while($db_app = DBfetch($db_applications))
{
@@ -256,6 +259,7 @@
" where h.hostid=i.hostid and ia.applicationid=".$db_app["applicationid"]." and i.itemid=ia.itemid".
" and h.status=".HOST_STATUS_MONITORED." and i.status=".ITEM_STATUS_ACTIVE.
$compare_description.$compare_host.
+ " and mod(h.hostid,100)=".$ZBX_CURNODEID.
" order by i.description";
$db_items = DBselect($sql);
@@ -346,6 +350,7 @@
$sql="select h.host,h.hostid,i.* from hosts h, items i LEFT JOIN items_applications ia ON ia.itemid=i.itemid".
" where ia.itemid is NULL and h.hostid=i.hostid and h.status=".HOST_STATUS_MONITORED." and i.status=".ITEM_STATUS_ACTIVE.
$compare_description.$compare_host.
+ " and mod(h.hostid,100)=".$ZBX_CURNODEID.
" order by i.description,h.host";
$db_items = DBselect($sql);