Zabbix 常見問題處理整理

liypsky發表於2013-03-15

zabbix是一個基於WEB介面的提供分散式系統監視以及網路監視功能的企業級的開源解決方案。
下載:
幫助:https://www.zabbix.com/documentation/doku.php?id=2.0/manual/appliance

環境:SUSE 12
Zabbix 2.0.4

★ Windows agent install:
1) edit zabbix_agentd.win.conf
2) C:>zabbix_agentd.exe --c C:zabbix_agents_2.0.4.winconfzabbix_agentd.win.conf --install
zabbix_agentd.exe [3724]: service [Zabbix Agent] installed successfully
zabbix_agentd.exe [3724]: event source [Zabbix Agent] installed successfully

配置檔案修改:
zabbix_agentd.win.conf

[@more@]LogFIle=c:zabbix_agentd.log
Server=監控伺服器IP
Hostname=本機的主機名或IP地址
ServerActive=127.0.0.1:10051

★ Linux agent install:
[root@xxx]# zabbix_agentd -c /usr/local/zabbix_agentd.conf
zabbix_agentd [14423]: user zabbix does not exist
zabbix_agentd [14423]: cannot run as root!
解決方法: useradd zabbix

aix test:
#> ./usr/local/bin/zabbix/sbin/zabbix_agentd -c /home/zabbix/conf/zabbix_agentd.conf

★ restart or status for service. To do so, log in using SSH as root user and execute:
$> service apache2 restart
$> service zabbix_server status
$> service mysql status

$> rczabbix_server status
$> /etc/init.d/zabbix_server status

★ 時區:
# cp /usr/share/zoneinfo/Asia/Chongqing /etc/localtime

★ 檢視當前時區
# date -R
Wed, 13 Mar 2013 20:09:02 +0800

★ 修改硬體時間
# hwclock -w

★ 修改PHP.ini 時區為中國,否則時間差8小時:
# vi /etc/php5/apache2/php.ini 內容改成如下
date.timezone = 'RPC'

★ 修改時區後,登入WEB後顯示錯誤:
date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead [include/func.inc.php:251]
修改PHP.ini 檔案中date.timezone = 'Asia/Chongqing‘

★ 中文顯示亂碼的問題:
透過上傳中文字型修改原字型來解決
# cd /usr/share/zabbix/fonts
# mv DejaVuSans.ttf DejaVuSans.ttf.bak
# mv simsun.ttc DejaVuSans.ttf

★ swap空間不足問題

★ 日誌:
zabbix_server: LogFile=/var/log/zabbix/zabbix_server.log
Mysql :log_error=/var/log/mysql/mysqld.log

★ Frontend access
# vi /etc/apache2/conf.d/zabbix.conf
# service apache2 restart

★ 登入zabbix Web介面後顯示

zabbix_server.log中顯示
2706:20130313:150455.037 cannot send list of active checks to [127.0.0.1]: host [Zabbix server] not monitored
2705:20130313:150655.060 cannot send list of active checks to [127.0.0.1]: host [Zabbix server] not monitored
2702:20130313:150855.082 cannot send list of active checks to [127.0.0.1]: host [Zabbix server] not monitored
解決方法:
1)
# SuSEfirewall2 stop
# SuSEfirewall2 open EXT TCP zabbix-trapper zabbix-agent
# SuSEfirewall2 start
SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
SuSEfirewall2: Firewall rules successfully set
2)
iptables 有點蛋疼,ubuntu裝了iptables以後 規則全空就是拒絕連線的。。
而且也不像redhat可以用服務停掉,暫時不知道怎麼禁用的
實在不行你就加兩條規則試試吧,
# iptables -A INPUT -p tcp -m tcp --dport 10051 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT
儲存新增iptables規則
# iptables-save > /root/iptables.save
# vi /etc/init.d/boot.local
iptables-restore /root/iptables.save #增加一條命令,讓系統的啟動的時候自動恢復
3)
setsebool -P httpd_can_network_connect on

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/678020/viewspace-1060302/,如需轉載,請註明出處,否則將追究法律責任。

相關文章