summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/scripts.inc.php
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-24 13:06:56 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-24 13:06:56 +0000
commitbb7db0ed62417d62c21d55c0518304c25805af91 (patch)
tree95a082d740e944d3877d451fb6281d003860cfa4 /frontends/php/include/scripts.inc.php
parent844612c2ddd19cb5e9a8d423c88f95b013ea73a4 (diff)
downloadzabbix-bb7db0ed62417d62c21d55c0518304c25805af91.tar.gz
zabbix-bb7db0ed62417d62c21d55c0518304c25805af91.tar.xz
zabbix-bb7db0ed62417d62c21d55c0518304c25805af91.zip
- [DEV-48] Support of Ping and Traceroute in Status of Triggers screen
[svn merge -r4906:4910 svn://svn.zabbix.com/branches/1.4.j] git-svn-id: svn://svn.zabbix.com/trunk@4911 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/scripts.inc.php')
-rw-r--r--frontends/php/include/scripts.inc.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/frontends/php/include/scripts.inc.php b/frontends/php/include/scripts.inc.php
index 66639a12..33f6f1c1 100644
--- a/frontends/php/include/scripts.inc.php
+++ b/frontends/php/include/scripts.inc.php
@@ -73,7 +73,16 @@ function execute_script($scriptid,$hostid){
}
if($res)
{
- $res = socket_connect($socket, '127.0.0.1', 10051);
+ global $ZBX_LOCALNODEID;
+
+ $res = false;
+
+ $sql = "SELECT ip,port FROM nodes WHERE nodeid=$ZBX_LOCALNODEID";
+ $node = DBselect($sql);
+ if($row = DBfetch($node))
+ {
+ $res = socket_connect($socket, $row['ip'], $row['port']);
+ }
}
if($res)
{