zabbix server 与数据库不在同一台服务器上面

 

 

16312:20170527:095215.225 database is down: reconnecting in 10 seconds  16312:20170527:095225.225 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through so

 

# netstat -lnutp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:8081                0.0.0.0:*                   LISTEN      29189/java          
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1134/sshd           
tcp        0      0 0.0.0.0:8090                0.0.0.0:*                   LISTEN      10412/java          
tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN      13806/smbd          
tcp        0      0 127.0.0.1:8000              0.0.0.0:*                   LISTEN      10412/java          
tcp        0      0 0.0.0.0:10050               0.0.0.0:*                   LISTEN      4652/zabbix_agentd  
tcp        0      0 0.0.0.0:9092                0.0.0.0:*                   LISTEN      10412/java          
tcp        0      0 127.0.0.1:8005              0.0.0.0:*                   LISTEN      29189/java          
tcp        0      0 0.0.0.0:873                 0.0.0.0:*                   LISTEN      18043/rsync         
tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN      13806/smbd          
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      4430/httpd          
[root@Appsrv63 proc]# /etc/init.d/zabbix-server status
zabbix_server (pid  16434) is running...

 这是因为数据库没有配在本地,所以需要在zabbix-server.conf可配置上数据库的ip

# grep DBHost /etc/zabbix/zabbix_server.conf 
### Option: DBHost
# DBHost=localhost
 DBHost=10.100.0.23  #数据库的ip地址

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值