zabbix server configure

  1. 云栖社区>
  2. 博客列表>
  3. 正文

zabbix server configure

ghost丶桃子 2016-03-25 17:04:15 浏览1640 评论0

摘要: 安装参考 http://blog.163.com/digoal@126/blog/static/1638770402014731111811804/ 修改zabbix server的配置文件 : [root@150 etc]# pwd /opt/zabbix/etc [root@150 etc]# vi zabbix_server.

安装参考 http://blog.163.com/digoal@126/blog/static/1638770402014731111811804/
修改zabbix server的配置文件 : 
[root@150 etc]# pwd
/opt/zabbix/etc
[root@150 etc]# vi zabbix_server.conf
ListenPort=10051
LogFile=/tmp/zabbix_server.log
LogFileSize=10
PidFile=/tmp/zabbix_server.pid
DBHost=127.0.0.1
DBName=zabbix
DBUser=zabbix
DBPassword=digoal
DBPort=5432
ListenIP=0.0.0.0

这里不涉及配置文件的优化, 优化后面再说.
启动zabbix server, 将以zabbix用户运行.
[root@150 etc]# zabbix_server -c /opt/zabbix/etc/zabbix_server.conf
[root@150 etc]# ps -ewf|grep zabbix_s
zabbix   17605     1  0 10:07 ?        00:00:00 zabbix_server -c /opt/zabbix/etc/zabbix_server.conf
zabbix   17608 17605  0 10:07 ?        00:00:00 zabbix_server: configuration syncer [synced configuration in 0.018076 sec, idle 60 sec]
zabbix   17609 17605  0 10:07 ?        00:00:00 zabbix_server: db watchdog [synced alerts config in 0.008745 sec, idle 60 sec]
zabbix   17610 17605  0 10:07 ?        00:00:00 zabbix_server: poller #1 [got 0 values in 0.000003 sec, idle 5 sec]
zabbix   17611 17605  0 10:07 ?        00:00:00 zabbix_server: poller #2 [got 0 values in 0.000004 sec, idle 5 sec]
zabbix   17612 17605  0 10:07 ?        00:00:00 zabbix_server: poller #3 [got 0 values in 0.000004 sec, idle 5 sec]
zabbix   17614 17605  0 10:07 ?        00:00:00 zabbix_server: poller #4 [got 0 values in 0.000004 sec, idle 5 sec]
zabbix   17615 17605  0 10:07 ?        00:00:00 zabbix_server: poller #5 [got 0 values in 0.000004 sec, idle 5 sec]
zabbix   17616 17605  0 10:07 ?        00:00:00 zabbix_server: unreachable poller #1 [got 0 values in 0.000004 sec, idle 5 sec]
zabbix   17617 17605  0 10:07 ?        00:00:00 zabbix_server: trapper #1 [processed data in 0.000000 sec, waiting for connection]
zabbix   17618 17605  0 10:07 ?        00:00:00 zabbix_server: trapper #2 [processed data in 0.000000 sec, waiting for connection]
zabbix   17619 17605  0 10:07 ?        00:00:00 zabbix_server: trapper #3 [processed data in 0.000000 sec, waiting for connection]
zabbix   17620 17605  0 10:07 ?        00:00:00 zabbix_server: trapper #4 [processed data in 0.000439 sec, waiting for connection]
zabbix   17622 17605  0 10:07 ?        00:00:00 zabbix_server: trapper #5 [processed data in 0.000000 sec, waiting for connection]
zabbix   17624 17605  0 10:07 ?        00:00:00 zabbix_server: icmp pinger #1 [got 0 values in 0.000006 sec, idle 5 sec]
zabbix   17626 17605  0 10:07 ?        00:00:00 zabbix_server: alerter [sent alerts: 0 success, 0 fail in 0.000868 sec, idle 30 sec]
zabbix   17629 17605  0 10:07 ?        00:00:00 zabbix_server: housekeeper [deleted 0 hist/trends, 0 items, 0 events, 0 sessions, 0 alarms, 0 audit items in 0.013199 sec, idle 1 hour(s)]
zabbix   17630 17605  0 10:07 ?        00:00:00 zabbix_server: timer #1 [processed 0 triggers, 0 events in 0.000016 sec, 0 maintenances in 0.002006 sec, idle 30 sec]
zabbix   17632 17605  0 10:07 ?        00:00:00 zabbix_server: http poller #1 [got 0 values in 0.001072 sec, idle 5 sec]
zabbix   17634 17605  0 10:07 ?        00:00:00 zabbix_server: discoverer #1 [processed 0 rules in 0.000846 sec, idle 60 sec]
zabbix   17635 17605  0 10:07 ?        00:00:00 zabbix_server: history syncer #1 [synced 0 items in 0.000001 sec, idle 5 sec]
zabbix   17636 17605  0 10:07 ?        00:00:00 zabbix_server: history syncer #2 [synced 0 items in 0.000001 sec, idle 5 sec]
zabbix   17637 17605  0 10:07 ?        00:00:00 zabbix_server: history syncer #3 [synced 0 items in 0.000002 sec, idle 5 sec]
zabbix   17638 17605  0 10:07 ?        00:00:00 zabbix_server: history syncer #4 [synced 0 items in 0.000001 sec, idle 5 sec]
zabbix   17639 17605  0 10:07 ?        00:00:00 zabbix_server: escalator [processed 0 escalations in 0.000646 sec, idle 3 sec]
zabbix   17641 17605  0 10:07 ?        00:00:00 zabbix_server: proxy poller #1 [exchanged data with 0 proxies in 0.000005 sec, idle 5 sec]
zabbix   17642 17605  0 10:07 ?        00:00:00 zabbix_server: self-monitoring [processed data in 0.000005 sec, idle 1 sec]


如果运行过程中, 需要重载配置文件执行 : 
[root@150 etc]# zabbix_server -c /opt/zabbix/etc/zabbix_server.conf -R config_cache_reload
command sent successfully


接下来需要修改web的配置文件, 连接到这台zabbix server
# vi /opt/www/zabbix/conf/zabbix.conf.php
$ZBX_SERVER      = '127.0.0.1';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = 'digoal';


我们可以看到, 在web中已经显示server运行了
zabbix server configure - 德哥@Digoal - PostgreSQL research

[参考]
【云栖快讯】阿里云栖开发者沙龙(Java技术专场)火热来袭!快来报名参与吧!  详情请点击

网友评论