Zabbix is an enterprise-level open-source solution that provides distributed system monitoring and network monitoring functions based on the Web interface.
Zabbix can monitor various network parameters to ensure secure operation of server systems. It also provides a flexible notification mechanism for system administrators to quickly locate and solve various problems.
Zabbix consists of two parts: zabbix server and the optional component zabbix agent.
Zabbix server can provide remote server/network status monitoring, data collection and other functions through SNMP, zabbix agent, ping, port monitoring and other methods, it can run in Linux, Solaris, HP-UX, aix, Free BSD, open BSD, OS X, and other platforms.
The zabbix agent must be installed on the monitored target server. It collects hardware information, memory, CPU, and other information related to the operating system. Zabbix agent can run in Linux, Solaris, HP-UX, Aix, Free BSD, open BSD, OS X, Tru64/osf1, Windows NT4.0, Windows (2000/2003/XP/Vista) and other systems.
The zabbix server can independently monitor the service status of the remote server. It can also be used with the zabbix agent to poll the zabbix agent to actively receive monitoring data (in the agent mode ), it can also passively receive data sent by zabbix agent (trapping mode ). In addition, zabbix server also supports SNMP (V1, V2) and can be used with SNMP software (for example, net-snmp.
I. Server Installation
1. install components
# Yum install-y make mysql-Server httpd PHP mysql-devel GCC net-snmp-devel curl-devel Perl-dbi php-Gd PHP-mysql PHP-bcmath PHP-mbstring PHP- XML
# Groupadd zabbix
# Useradd zabbix-G zabbix
2. Start the database
# Service mysqld start
# Mysql-u Root Password''
# Mysql-u root-P (enter the password)
3. Create a zabbix Database
Mysql> Create Database zabbix Character Set utf8;
Mysql> grant all on zabbix. * to [email protected] 'localhost' identified by 'zabbixpass ';
Mysql> flush privileges;
4. Import SQL database
# Tar-zxvf zabbix-2.2.3.tar.gz
# Cd zabbix-2.2.3/database/MySQL
# Mysqldump-H localhost-uzabbix-pzabbixpass zabbix <schema. SQL
# Mysqldump-H localhost-uzabbix-pzabbixpass zabbix <images. SQL
# Mysqldump-H localhost-uzabbix-pzabbixpass zabbix <data. SQL
5. Compile and install
# Cd zabbix-2.2.3
#./Configure -- prefix =/usr/local/zabbix -- With-mysql -- With-net-snmp -- With-libcurl -- enable-server -- enable-agent -- enable-proxy
# Make & make install
6. Add a port
# Add Vim/etc/services
Zabbix-Agent 10050/tcp # zabbix agent
Zabbix-Agent 10050/udp # zabbix agent
Zabbix-Trapper 10051/tcp # zabbix trapper
Zabbix-Trapper 10051/udp # zabbix trapper
7. modify the configuration file
# Vim/usr/local/zabbix/etc/zabbix_server.conf
Dbname = zabbix
Dbuser = zabbix account used to connect to the database, which corresponds to the MySQL authorized account
Dbpassword = password for zabbixpass to connect to the database, which corresponds to the password of the MySQL authorized account
# Cp MISC/init. d/Fedora/core5/zabbix_server/etc/init. d/
# Cp MISC/init. d/Fedora/core5/zabbix_agentd/etc/init. d/
# Chmod + x/etc/init. d/zabbix _*
# Vim/etc/init. d/zabbix_server
Zabbix_bin = "/usr/local/sbin/zabbix_server" (modify)
Zabbix_bin = "/usr/local/zabbix/sbin/zabbix_server"
# Vim/etc/init. d/zabbix_agentd
Zabbix_bin = "/usr/local/sbin/zabbix_agentd" (modify)
Zabbix_bin = "/usr/local/zabbix/sbin/zabbix_agentd"
8. Start the service and set startup.
#/Etc/init. d/zabbix_server start
#/Etc/init. d/zabbix_agentd start
# Chkconfig zabbix_server on
# Chkconfig zabbix_agentd on
9. Configure the PHP File
# Mkdir-P/var/www/html/zabbix
# Cp-RF zabbix-2.2.3/frontends/PHP/*/var/www/html/zabbix
# Chown-r zabbix: zabbix
# Chown-r Apache: Apache/var/www/html/zabbix/Conf
10. Modify PHP Parameters
# Vim/etc/PHP. ini
Max_execution_time= 300
Max_input_time= 300
Date. timezone = "Asia/Shanghai"
Post_max_size = 32 m
Service httpd restart
Log on to http: // ip/zabbix to configure the web page.
Ii. Client installation
1. Create a user
# Groupadd zabbix
# Useradd zabbix-G zabbix
2. Compile and install
# Cd zabbix-2.2.3
#./Configure -- prefix =/usr/local/zabbix -- With-net-snmp -- With-libcurl -- enable-agent
# Make & make install
3. Add a port
# Vim/etc/services
Zabbix-Agent 10050/tcp # zabbix agent
Zabbix-Agent 10050/udp # zabbix agent
Zabbix-Trapper 10051/tcp # zabbix trapper
Zabbix-Trapper 10051/udp # zabbix trapper
4. modify the configuration file
# Cp MISC/init. d/Fedora/core5/zabbix_agentd/etc/init. d/
# Chown-r zabbix: zabbix/etc/init. d/zabbix_agentd
# Chmod + x/etc/init. d/zabbix_agentd
# Vim/etc/init. d/zabbix_agentd
Zabbix_bin = "/usr/local/sbin/zabbix_agentd"
Zabbix_bin = "/usr/local/zabbix/sbin/zabbix_agentd"
# Chkconfig zabbix_agentd on
# Vim/usr/local/zabbix/etc/zabbix_agentd.conf
Server = zabbix Server IP
Hostname = local name
Logfile = Local agentd log SAVING file
Sourceip = Local IP Address
Listenport = 10050
Service zabbix_agentd start