这几天为了做监控在ubuntu服务器上部署了zabbix做监控。过程还是遇到了一些问题,把他记录下来。希望对大家有帮助吧。原文来源:http://www.jincon.com/archives/169/
这里千万记住,zabbix 不建议用最新版本,唉~~~~找个稍微次级版本即可。
这次安装过程过程出现了报错:
zabbix红色弹出报错:zabbix server is not running: the information displayed may not be current jincon
网页中不停地有以下红色提示:
zabbix server is not running: the information displayed may not be current.
zabbix server is running | No.
查看/tmp/zabbix_server.log和/tmp/zabbix_agent.log无任何异常。看zabbix_server和zabbix_agent进程、端口都正常
从网上查找了很多的资料,众说纷纭,浪费了我大量的时间。 查找问题:
后来还是决定从zabbix的php文件着手,毕竟弹出是zabbix的php系统里面的嘛。
系统会post数据到:zabbix/jsrpc.php?output=json-rpc
返回json数据。代码约在164行开始:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
case 'zabbix.status':
$session = Z::getInstance()->getSession();
if (!isset($session['serverCheckResult']) || ($session['serverCheckTime']
+ SERVER_CHECK_INTERVAL) isRunning();
$session['serverCheckTime'] = time();
}
#http://www.jincon.com
$result = array(
'result' => (bool) $session['serverCheckResult'],
'message' => $session['serverCheckResult'] ? '' : _('Zabbix server is not
running: the information displayed may not be current.')
);
break;