diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-12-15 18:04:42 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-12-15 18:04:42 +0000 |
| commit | e7c29909dff6f936e220bc2b05eb7a3e6776dec1 (patch) | |
| tree | 8b2534dd6a5efc3936d504f7de27249a321242a3 /frontends/php | |
| parent | 1f8cfaaeb9f90817933674ae9b56ae4398455911 (diff) | |
| download | zabbix-e7c29909dff6f936e220bc2b05eb7a3e6776dec1.tar.gz zabbix-e7c29909dff6f936e220bc2b05eb7a3e6776dec1.tar.xz zabbix-e7c29909dff6f936e220bc2b05eb7a3e6776dec1.zip | |
- in case of network error, zabbix_suckerd will not try to request any parameters
from the host during next 120 seconds (Alexei)
- added directory upgrades/dbpatches/1.0alpha12_to_1.0beta1 (Alexei)
- added column disabled_until to table hosts (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@264 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
| -rw-r--r-- | frontends/php/graph.html | 2 | ||||
| -rw-r--r-- | frontends/php/hosts.html | 2 | ||||
| -rw-r--r-- | frontends/php/include/config.inc | 2 | ||||
| -rw-r--r-- | frontends/php/latest.html | 4 | ||||
| -rw-r--r-- | frontends/php/map.html | 4 | ||||
| -rw-r--r-- | frontends/php/queue.html | 2 | ||||
| -rw-r--r-- | frontends/php/report2.html | 2 | ||||
| -rw-r--r-- | frontends/php/tr_status.html | 2 |
8 files changed, 11 insertions, 9 deletions
diff --git a/frontends/php/graph.html b/frontends/php/graph.html index 15d99787..97ba4ce5 100644 --- a/frontends/php/graph.html +++ b/frontends/php/graph.html @@ -94,7 +94,7 @@ echo "Parameter"; show_table2_h_delimiter(); - $result=DBselect("select h.host,i.description,i.itemid from hosts h,items i where h.hostid=i.hostid and h.status=0 and i.status in (0,2) order by h.host,i.description"); + $result=DBselect("select h.host,i.description,i.itemid from hosts h,items i where h.hostid=i.hostid and h.status in (0,2) and i.status in (0,2) order by h.host,i.description"); echo "<select name=\"itemid\" size=1>"; for($i=0;$i<DBnum_rows($result);$i++) { diff --git a/frontends/php/hosts.html b/frontends/php/hosts.html index f6c019cd..87ab8dcf 100644 --- a/frontends/php/hosts.html +++ b/frontends/php/hosts.html @@ -72,6 +72,8 @@ echo "<a href=\"hosts.html?hostid=$hostid_®ister=changestatus&status=1\">Monitored</a>"; else if($status_ == 1) echo "<a href=\"hosts.html?hostid=$hostid_®ister=changestatus&status=0\">Not monitored</a>"; + else if($status_ == 2) + echo "Unreachable"; else echo "Unknown"; echo "</TD>"; diff --git a/frontends/php/include/config.inc b/frontends/php/include/config.inc index ff36111f..4586397b 100644 --- a/frontends/php/include/config.inc +++ b/frontends/php/include/config.inc @@ -1320,7 +1320,7 @@ { $useip=0; } - $sql="insert into hosts (host,port,status,useip,ip) values ('$host',$port,$status,$useip,'$ip')"; + $sql="insert into hosts (host,port,status,useip,ip,disable_until) values ('$host',$port,$status,$useip,'$ip',0)"; $result=DBexecute($sql); if(!$result) { diff --git a/frontends/php/latest.html b/frontends/php/latest.html index 067d1a91..10a32b43 100644 --- a/frontends/php/latest.html +++ b/frontends/php/latest.html @@ -13,7 +13,7 @@ echo "<font size=2>"; - $result=DBselect("select h.hostid,h.host from hosts h,items i where h.status=0 and h.hostid=i.hostid group by h.hostid,h.host order by h.host"); + $result=DBselect("select h.hostid,h.host from hosts h,items i where h.status in (0,2) and h.hostid=i.hostid group by h.hostid,h.host order by h.host"); for($i=0;$i<DBnum_rows($result);$i++) { @@ -75,7 +75,7 @@ $col=0; - $result=DBselect("select h.host,i.itemid,i.description,i.lastvalue,i.prevvalue,i.lastclock,i.status,h.hostid from items i,hosts h where h.hostid=i.hostid and h.status=0 and h.hostid=$hostid order by h.host,i.description"); + $result=DBselect("select h.host,i.itemid,i.description,i.lastvalue,i.prevvalue,i.lastclock,i.status,h.hostid from items i,hosts h where h.hostid=i.hostid and h.status in (0,2) and h.hostid=$hostid order by h.host,i.description"); for($i=0;$i<DBnum_rows($result);$i++) { $host=DBget_field($result,$i,0); diff --git a/frontends/php/map.html b/frontends/php/map.html index 0a0511aa..dce478e0 100644 --- a/frontends/php/map.html +++ b/frontends/php/map.html @@ -111,12 +111,12 @@ } else { - $result1=DBselect("select count(*) from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.istrue=1 and h.status=0 and i.status=0"); + $result1=DBselect("select count(*) from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.istrue=1 and h.status in (0,2) and i.status=0"); $count=DBget_field($result1,0,0); if($count==1) { $color=$red; - $result1=DBselect("select t.description from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.istrue=1 and h.status=0 and i.status=0"); + $result1=DBselect("select t.description from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.istrue=1 and h.status (0,2) and i.status=0"); $label=DBget_field($result1,0,0); } else if($count>1) diff --git a/frontends/php/queue.html b/frontends/php/queue.html index 9ce1a7ff..62b59da8 100644 --- a/frontends/php/queue.html +++ b/frontends/php/queue.html @@ -15,7 +15,7 @@ ?> <? $now=time(); - $result=DBselect("select i.itemid, i.nextcheck, i.description, h.host from items i,hosts h where i.status=0 and h.status=0 and i.hostid=h.hostid and i.nextcheck<$now order by i.nextcheck"); + $result=DBselect("select i.itemid, i.nextcheck, i.description, h.host from items i,hosts h where i.status in (0,2) and h.status=0 and i.hostid=h.hostid and i.nextcheck<$now order by i.nextcheck"); echo "<table border=0 width=100% bgcolor='#CCCCCC' cellspacing=1 cellpadding=3>"; echo "\n"; echo "<tr><td><b>Next time to check</b></td><td><b>Host</b></td><td><b>Description</b></td></tr>"; diff --git a/frontends/php/report2.html b/frontends/php/report2.html index 22747483..18806ae1 100644 --- a/frontends/php/report2.html +++ b/frontends/php/report2.html @@ -26,7 +26,7 @@ <? - $result=DBselect("select h.hostid,h.host,t.triggerid,t.expression,t.description,t.istrue from triggers t,hosts h,items i,functions f where f.itemid=i.itemid and h.hostid=i.hostid and t.istrue!=2 and t.triggerid=f.triggerid and h.status=0 and i.status=0 order by h.host,t.lastchange desc, t.description"); + $result=DBselect("select h.hostid,h.host,t.triggerid,t.expression,t.description,t.istrue from triggers t,hosts h,items i,functions f where f.itemid=i.itemid and h.hostid=i.hostid and t.istrue!=2 and t.triggerid=f.triggerid and h.status in (0,2) and i.status=0 order by h.host,t.lastchange desc, t.description"); $lasthost=""; $col=0; diff --git a/frontends/php/tr_status.html b/frontends/php/tr_status.html index 3cf886ce..7b42a64f 100644 --- a/frontends/php/tr_status.html +++ b/frontends/php/tr_status.html @@ -68,7 +68,7 @@ echo "STATUS OF TRIGGERS"; show_table_v_delimiter(); - $result=DBselect("select hostid,host from hosts where status=0 order by host"); + $result=DBselect("select hostid,host from hosts where status in (0,2) order by host"); if(isset($hostid)) { echo "<A HREF=\"tr_status.html?onlytrue=$onlytrue&noactions=$noactions&compact=$compact\">all</A> "; |
