diff options
| author | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-24 13:06:56 +0000 |
|---|---|---|
| committer | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-24 13:06:56 +0000 |
| commit | bb7db0ed62417d62c21d55c0518304c25805af91 (patch) | |
| tree | 95a082d740e944d3877d451fb6281d003860cfa4 /frontends/php/include/scripts.inc.php | |
| parent | 844612c2ddd19cb5e9a8d423c88f95b013ea73a4 (diff) | |
| download | zabbix-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.php | 11 |
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) { |
