[[email protected] zabbix]# /etc/init.d/zabbix_server start
Starting zabbix_server (via systemctl): [ OK ]
[[email protected] ~]# ps -ef|grep zabbix
root 20125 19728 0 10:22 pts/3 00:00:00 grep --color=auto zabbix
表面上zabbix_server已经启动了,但是并没有发现zabbix_server进程
解决方法:查看服务状态报告
[[email protected] ~]# /etc/init.d/zabbix_server status
● zabbix_server.service - SYSV: Starts and stops Zabbix Server using chkconfig
Loaded: loaded (/etc/rc.d/init.d/zabbix_server; bad; vendor preset: disabled)
Active: active (exited) since Mon 2017-02-27 16:27:22 CST; 18h ago
Docs: man:systemd-sysv-gene rator(8)
Feb 27 16:27:22 iZ25m1box8cZ systemd[1]: Starting SYSV: Starts and stops Zabbix Server using chkconfig...
Feb 27 16:27:22 iZ25m1box8cZ zabbix_server[6313]: Starting zabbix_server: /usr/local/zabbix//sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.20: ca...or directory
Feb 27 16:27:22 iZ25m1box8cZ zabbix_server[6313]: [FAILED]
Feb 27 16:27:22 iZ25m1box8cZ systemd[1]: Started SYSV: Starts and stops Zabbix Server using chkconfig.
Hint: Some lines were ellipsized, use -l to show in full.
对应解决:
[[email protected] mysql]# ls /usr/local/mysql/lib/
libmysqlclient.a libmysqlclient.so libmysqlclient.so.20 libmysqlclient.so.20.3.3 libmysqld.a libmysqld-debug.a libmysqlservices.a mecab pkgconfig plugin
[[email protected] mysql]# ln -s /usr/local/mysql/lib/libmysqlclient.so.20 /usr/lib64/
重启zabbix_server:
[[email protected] zabbix]# /etc/init.d/zabbix_server restart
再次查看服务状态报告:
[[email protected] ~]# /etc/init.d/zabbix_server status
● zabbix_server.service - SYSV: Starts and stops Zabbix Server using chkconfig
Loaded: loaded (/etc/rc.d/init.d/zabbix_server; bad; vendor preset: disabled)
Active: active (exited) since Tue 2017-02-28 11:25:07 CST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 22235 ExecStop=/etc/rc.d/init.d/zabbix_server stop (code=exited, status=0/SUCCESS)
Process: 22249 ExecStart=/etc/rc.d/init.d/zabbix_server start (code=exited, status=0/SUCCESS)
Feb 28 11:25:07 iZ25m1box8cZ systemd[1]: Starting SYSV: Starts and stops Zabbix Server using chkconfig...
Feb 28 11:25:07 iZ25m1box8cZ zabbix_server[22249]: Starting zabbix_server: zabbix_server [22256]: unknown parameter [alertScriptsPath] in config file [/usr/local/zabbix/etc/zab...], line 100
Feb 28 11:25:07 iZ25m1box8cZ zabbix_server[22249]: [FAILED]
Feb 28 11:25:07 iZ25m1box8cZ systemd[1]: Started SYSV: Starts and stops Zabbix Server using chkconfig.
Hint: Some lines were ellipsized, use -l to show in full.
即去修改 /usr/local/zabbix/etc/zabbix_server.conf中的AalertScriptsPath就行了。
最后再次重启zabbix_server:
[[email protected] zabbix]# /etc/init.d/zabbix_server restart
Restarting zabbix_server (via systemctl): [ OK ]
[[email protected] ~]# /etc/init.d/zabbix_server status
● zabbix_server.service - SYSV: Starts and stops Zabbix Server using chkconfig
Loaded: loaded (/etc/rc.d/init.d/zabbix_server; bad; vendor preset: disabled)
Active: active (running) since Tue 2017-02-28 11:25:40 CST; 4s ago
Docs: man:systemd-sysv-generator(8)
Process: 22293 ExecStop=/etc/rc.d/init.d/zabbix_server stop (code=exited, status=0/SUCCESS)
Process: 22307 ExecStart=/etc/rc.d/init.d/zabbix_server start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/zabbix_server.service
├─22316 /usr/local/zabbix/sbin/zabbix_server
├─22318 /usr/local/zabbix/sbin/zabbix_server: configuration syncer [waiting 60 sec for processes]
├─22319 /usr/local/zabbix/sbin/zabbix_server: db watchdog [synced alerts config in 0.001065 sec, idle 60 sec]
├─22320 /usr/local/zabbix/sbin/zabbix_server: poller #1 [got 0 values in 0.000017 sec, idle 5 sec]
├─22321 /usr/local/zabbix/sbin/zabbix_server: poller #2 [got 0 values in 0.000020 sec, idle 5 sec]
├─22322 /usr/local/zabbix/sbin/zabbix_server: poller #3 [got 0 values in 0.000024 sec, idle 5 sec]
├─22323 /usr/local/zabbix/sbin/zabbix_server: poller #4 [got 0 values in 0.000019 sec, idle 5 sec]
├─22324 /usr/local/zabbix/sbin/zabbix_server: poller #5 [got 0 values in 0.000025 sec, idle 5 sec]
├─22325 /usr/local/zabbix/sbin/zabbix_server: unreachable poller #1 [got 0 values in 0.000020 sec, idle 5 sec]
├─22326 /usr/local/zabbix/sbin/zabbix_server: trapper #1 [processed data in 0.000000 sec, waiting for connection]
├─22327 /usr/local/zabbix/sbin/zabbix_server: trapper #2 [processed data in 0.000000 sec, waiting for connection]
├─22328 /usr/local/zabbix/sbin/zabbix_server: trapper #3 [processed data in 0.000000 sec, waiting for connection]
├─22329 /usr/local/zabbix/sbin/zabbix_server: trapper #4 [processed data in 0.000000 sec, waiting for connection]
├─22330 /usr/local/zabbix/sbin/zabbix_server: trapper #5 [processed data in 0.000000 sec, waiting for connection]
├─22331 /usr/local/zabbix/sbin/zabbix_server: icmp pinger #1 [got 0 values in 0.000024 sec, idle 5 sec]
├─22332 /usr/local/zabbix/sbin/zabbix_server: alerter [sent alerts: 0 success, 0 fail in 0.000555 sec, idle 30 sec]
├─22333 /usr/local/zabbix/sbin/zabbix_server: housekeeper [deleted 0 hist/trends, 0 items, 0 events, 0 sessions, 0 alarms, 0 audit items in 0.207611
├─22334 /usr/local/zabbix/sbin/zabbix_server: timer #1 [processed 0 triggers, 0 events in 0.000000 sec, 0 maintenances in 0.000000 sec, idle 20 sec]
├─22335 /usr/local/zabbix/sbin/zabbix_server: http poller #1 [got 0 values in 0.000369 sec, idle 5 sec]
├─22336 /usr/local/zabbix/sbin/zabbix_server: discoverer #1 [processed 0 rules in 0.000411 sec, idle 60 sec]
├─22337 /usr/local/zabbix/sbin/zabbix_server: history syncer #1 [synced 0 items in 0.000011 sec, idle 5 sec]
├─22338 /usr/local/zabbix/sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, idle 5 sec]
├─22339 /usr/local/zabbix/sbin/zabbix_server: history syncer #3 [synced 0 items in 0.000008 sec, idle 5 sec]
├─22340 /usr/local/zabbix/sbin/zabbix_server: history syncer #4 [synced 0 items in 0.000010 sec, idle 5 sec]
├─22341 /usr/local/zabbix/sbin/zabbix_server: escalator [processed 0 escalations in 0.000373 sec, idle 3 sec]
├─22342 /usr/local/zabbix/sbin/zabbix_server: proxy poller #1 [exchanged data with 0 proxies in 0.000017 sec, idle 5 sec]
└─22343 /usr/local/zabbix/sbin/zabbix_server: self-monitoring [processed data in 0.000004 sec, idle 1 sec]
Feb 28 11:25:40 iZ25m1box8cZ systemd[1]: Starting SYSV: Starts and stops Zabbix Server using chkconfig...
Feb 28 11:25:40 iZ25m1box8cZ zabbix_server[22307]: Starting zabbix_server: [ OK ]
Feb 28 11:25:40 iZ25m1box8cZ systemd[1]: Started SYSV: Starts and stops Zabbix Server using chkconfig.
zabbix_agentd也是现象也是同样,没有运行进程。
检测方法: agentd进程直接后面跟配置文件运行
[[email protected] ~]# /data/zabbix/sbin/zabbix_agentd -c /data/zabbix/etc/zabbix_agentd.conf