Home | Mirror | Search

6. Zabbix

6.1. Installing and Configuring Zabbix

neo@monitor:~$ apt-cache search zabbix
zabbix-agent - network monitoring solution - agent
zabbix-frontend-php - network monitoring solution - PHP front-end
zabbix-proxy-mysql - network monitoring solution - proxy (using MySQL)
zabbix-proxy-pgsql - network monitoring solution - proxy (using PostgreSQL)
zabbix-server-mysql - network monitoring solution - server (using MySQL)
zabbix-server-pgsql - network monitoring solution - server (using PostgreSQL)
		
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY 'chen' WITH GRANT OPTION;
FLUSH PRIVILEGES;
		
sudo apt-get install zabbix-server-mysql zabbix-frontend-php
		

如果上述過程中遇到一些問題,可以手工安裝資料庫

		
$ sudo mysql -uroot -p -e"create database zabbix;"
$ sudo mysql -uroot -p -e"grant all privileges on zabbix.* to zabbix@localhost identified by 'enter-password-here';"
$ mysql -uzabbix -p zabbix < /usr/share/zabbix-server/mysql.sql
$ mysql -uzabbix -p zabbix < /usr/share/zabbix-server/data.sql
$ sudo dpkg-reconfigure zabbix-server-mysql
		
		
		
cat >> /etc/services <<EOF

zabbix-agent    10050/tcp                       #Zabbix Agent  
zabbix-agent    10050/udp                       #Zabbix Agent  
zabbix-trapper  10051/tcp                       #Zabbix Trapper  
zabbix-trapper  10051/udp                       #Zabbix Trapper  
EOF		
		
		

6.2. web ui

http://localhost/zabbix/

user: admin

passwd: zabbix

6.3. zabbix-agent

# sudo apt-get install zabbix-agent

		

/etc/zabbix/zabbix_agent.conf

#Server=localhost
Server=your_server_ip_address
		

# vim /etc/services

zabbix-agent    10050/tcp                       #Zabbix Agent
zabbix-agent    10050/udp                       #Zabbix Agent
		

# sudo /etc/init.d/zabbix-agent restart
		
comments powered by Disqus