无法执行脚本 细节 空的回应收到来自于 Zabbix 服务器 "localhost". [scripts_exec.php:71 → CFrontendApiWrapper->execute() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CScript->execute() → CApiService::exception() in include/classes/api/services/CScript.php:311] Ping /bin/ping -c 3 192.168.10.125 ******************** 脚本探查器 ******************** 总时间:0.069591 总SQL时间:0.011876 SQL count: 23 (selects: 15 | executes: 8) 峰值内存使用量:8M 内存限制:256M 1. script.get [scripts_exec.php:53] 参数: Array ( [scriptids] => 1 [output] => Array ( [0] => name [1] => command ) ) 结果: Array ( [0] => Array ( [scriptid] => 1 [name] => Ping [command] => /bin/ping -c 3 {HOST.CONN} ) ) 2. script.execute [scripts_exec.php:71] 参数: Array ( [hostid] => 10105 [scriptid] => 1 ) 结果: SQL (8.7E-5): SET NAMES utf8 scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → DBexecute() in include/db.inc.php:63 SQL (0.000605): SHOW TABLES LIKE 'dbversion' scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → DbBackend->checkDbVersion() → MysqlDbBackend->checkDbVersionTable() → DBselect() in include/classes/db/MysqlDbBackend.php:32 SQL (0.000314): SELECT dv.mandatory,dv.optional FROM dbversion dv scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → DbBackend->checkDbVersion() → DBselect() in include/classes/db/DbBackend.php:46 SQL (0.000208): SELECT NULL FROM config c scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → DbBackend->checkConfig() → DBselect() in include/classes/db/DbBackend.php:62 SQL (0.000257): BEGIN scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBstart() → DBexecute() in include/db.inc.php:262 SQL (0.000526): SELECT u.userid,u.autologout,s.lastaccess FROM sessions s,users u WHERE s.sessionid='e94b9f22696c1715984db4de6ce56629' AND s.status=0 AND s.userid=u.userid AND (s.lastaccess+u.autologout>1487668523 OR u.autologout=0) scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CUser->checkAuthentication() → DBselect() in include/classes/api/services/CUser.php:1196 SQL (0.000551): SELECT g.usrgrpid FROM usrgrp g,users_groups ug WHERE ug.userid='3' AND g.usrgrpid=ug.usrgrpid AND g.users_status=1 LIMIT 1 OFFSET 0 scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CUser->checkAuthentication() → check_perm2system() → DBselect() in include/perm.inc.php:75 SQL (0.000408): UPDATE sessions SET lastaccess=1487668523 WHERE userid='3' AND sessionid='e94b9f22696c1715984db4de6ce56629' scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CUser->checkAuthentication() → DBexecute() in include/classes/api/services/CUser.php:1221 SQL (0.000366): SELECT MAX(g.gui_access) AS gui_access FROM usrgrp g,users_groups ug WHERE ug.userid='3' AND g.usrgrpid=ug.usrgrpid scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CUser->checkAuthentication() → DBselect() in include/classes/api/services/CUser.php:1229 SQL (0.000293): SELECT u.userid,u.alias,u.name,u.surname,u.url,u.autologin,u.autologout,u.lang,u.refresh,u.type, u.theme,u.attempt_failed,u.attempt_ip,u.attempt_clock,u.rows_per_page FROM users u WHERE u.userid='3' scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CUser->checkAuthentication() → CUser->_getUserData() → DBselect() in include/classes/api/services/CUser.php:1253 SQL (0.000331): SELECT ug.userid FROM usrgrp g,users_groups ug WHERE ug.userid='3' AND g.usrgrpid=ug.usrgrpid AND g.debug_mode=1 scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CUser->checkAuthentication() → CUser->_getUserData() → DBselect() in include/classes/api/services/CUser.php:1261 SQL (0.001354): COMMIT scripts_exec.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CFrontendApiWrapper->checkAuthentication() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBend() → DBcommit() → DBexecute() in include/db.inc.php:323 SQL (0.00053): SELECT c.* FROM config c scripts_exec.php:31 → require_once() → select_config() → DBselect() in include/profiles.inc.php:33 SQL (0.002589): SELECT p.* FROM profiles p WHERE p.userid=3 ORDER BY p.userid,p.profileid scripts_exec.php:31 → require_once() → CProfile::get() → CProfile::init() → DBselect() in include/classes/user/CProfile.php:42 SQL (0.000135): BEGIN scripts_exec.php:53 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBstart() → DBexecute() in include/db.inc.php:262 SQL (0.000344): SELECT s.scriptid,s.name,s.command FROM scripts s WHERE s.scriptid='1' scripts_exec.php:53 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CScript->get() → DBselect() in include/classes/api/services/CScript.php:159 SQL (8.7E-5): COMMIT scripts_exec.php:53 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBend() → DBcommit() → DBexecute() in include/db.inc.php:323 SQL (0.000771): SELECT i.hostid,i.interfaceid,i.ip,i.dns,i.useip,i.port,i.type,i.main FROM interface i WHERE i.main=1 AND i.hostid='10105' AND i.type IN ('1','2','3','4') scripts_exec.php:63 → CMacrosResolverHelper::resolve() → CMacrosResolver->resolve() → CMacrosResolver->resolveTexts() → DBselect() in include/classes/macros/CMacrosResolver.php:250 SQL (0.00016): BEGIN scripts_exec.php:71 → CFrontendApiWrapper->execute() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBstart() → DBexecute() in include/db.inc.php:262 SQL (0.000805): SELECT h.hostid FROM hosts h WHERE h.flags IN (0,4) AND h.hostid='10105' AND h.status IN (0,1) scripts_exec.php:71 → CFrontendApiWrapper->execute() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CScript->execute() → CHost->get() → DBselect() in include/classes/api/services/CHost.php:432 SQL (0.000657): SELECT DISTINCT g.groupid FROM groups g,hosts_groups hg WHERE hg.hostid='10105' AND hg.groupid=g.groupid scripts_exec.php:71 → CFrontendApiWrapper->execute() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CScript->execute() → CScript->get() → CHostGroup->get() → DBselect() in include/classes/api/services/CHostGroup.php:318 SQL (0.00029): SELECT s.scriptid FROM scripts s WHERE (s.groupid='1' OR s.groupid IS NULL) AND s.scriptid='1' scripts_exec.php:71 → CFrontendApiWrapper->execute() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CScript->execute() → CScript->get() → DBselect() in include/classes/api/services/CScript.php:159 SQL (0.000208): ROLLBACK scripts_exec.php:71 → CFrontendApiWrapper->execute() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBend() → DBrollback() → DBexecute() in include/db.inc.php:352 隐藏调试