Zabbix监控Linux主机

上篇文章中,Zabbix-server已经配置好了,现用它来监控网络中的linux主机。
在被监控LINUX上安装zabbix-agent

yum -y install zabbix20-agent
vim /etc/zabbix_agentd.conf //更改Server=192.168.110.152(服务端ip)
启动客户端 
/etc/init.d/zabbix-agent start
开机自启动
 chkconfig zabbix-agent on
服务端上命令行测试:zabbix_get -s 客户端ip -p10050 -k "system.hostname”

继续阅读

发表在 linux | 标签为 | Zabbix监控Linux主机已关闭评论

zabbix在mysql改密码后前台php报错无法登入

因刚开始安装zabbix时,在mysql中创建的同名zabbix账号弱口令,修改密码后,前台php一直报错:

[Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

查看zabbix_server.log:

25877:20140304:160513.718 [Z3005] query failed: [1317] Query execution was interrupted [select h.hostid,h.host,h.name,t.httptestid,
t.name,t.variables,t.agent,t.authentication,t.http_user,t.http_password,t.http_proxy,t.retries from httptest t,hosts h where t.hosti
d=h.hostid and t.nextcheck<=1393920313 and mod(t.httptestid,1)=0 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.mai
ntenance_status=0 or h.maintenance_type=0)]
25877:20140304:160513.718 [Z3005] query failed: [2006] MySQL server has gone away [select min(t.nextcheck) from httptest t,hosts h
where t.hostid=h.hostid and mod(t.httptestid,1)=0 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.maintenance_status
=0 or h.maintenance_type=0)]
25877:20140304:160513.719 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

25877:20140304:160513.718 [Z3005] query failed: [1317] Query execution was interrupted [select h.hostid,h.host,h.name,t.httptestid,
t.name,t.variables,t.agent,t.authentication,t.http_user,t.http_password,t.http_proxy,t.retries from httptest t,hosts h where t.hosti
d=h.hostid and t.nextcheck<=1393920313 and mod(t.httptestid,1)=0 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.mai
ntenance_status=0 or h.maintenance_type=0)]
25877:20140304:160513.718 [Z3005] query failed: [2006] MySQL server has gone away [select min(t.nextcheck) from httptest t,hosts h
where t.hostid=h.hostid and mod(t.httptestid,1)=0 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.maintenance_status
=0 or h.maintenance_type=0)]
25877:20140304:160513.719 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

继续阅读

发表在 linux | 标签为 | zabbix在mysql改密码后前台php报错无法登入已关闭评论

Zabbix安装

1、 安装zabbix

yum install -y epel-release

安装rpm包的lamp环境

 yum install -y  httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gd php-mbstring

安装zabbix服务端:

yum install  zabbix20 zabbix20-agent zabbix20-server  zabbix20-server-mysql zabbix20-web zabbix20-web-mysql net-snmp-devel

继续阅读

发表在 linux | 标签为 | Zabbix安装已关闭评论