Centos7.0 installation zabbix2.4.5

Source: Internet
Author: User
Tags snmp disk usage egrep

Today the main introduction in Centos7.0 under the source installation zabbix2.4.5

Zabbix is an enterprise-class, open-source, distributed monitoring Suite
The Zabbix can monitor network and service monitoring status. Zabbix uses a flexible alerting mechanism that allows users to send email-based alarms to events. This ensures a quick response to the problem. Zabbix can use stored data to provide outstanding reporting and graphical methods. This feature will help users complete capacity planning.
Zabbix supports two ways of polling and trapping. All Zabbix reports can be accessed via the configuration parameters on the Web front end. The Web front end will help you get the most out of your network and service in any region. Zabbix can play the role of monitoring your IT infrastructure with as much configuration as possible, whether you're from a small organization or a large company.
The Zabbix is 0 cost. Because Zabbix is written and published based on the GPL V2 protocol. means that the source code is released free of charge.


First, the Zabbix process introduction:
Zabbix_agentd
The client daemon, which collects client data, such as CPU load, memory, hard disk usage, etc.
Zabbix_get
The Zabbix tool, which is used separately, usually executes commands to obtain remote client information on the server or proxy side. Usually the user is wrongly discharged. For example, on the server side, we can use Zabbix_get to get the contents of the client to troubleshoot by getting the client's memory data.
Zabbix_sender
The Zabbix tool, used to send data to a server or proxy, is typically used for lengthy checks. Many checks are very time consuming, resulting in Zabbix timeouts. So we use sender to commit the data after the script has finished executing.
Zabbix_server
Zabbix Server daemon. Zabbix_agentd, Zabbix_get, Zabbix_sender, Zabbix_proxy, Zabbix_java_gateway data are ultimately submitted to the server
Note: Of course, is not the data are actively submitted to zabbix_server, there are some servers actively to fetch data.
Zabbix_proxy
Zabbix the agent daemon process. Functionally similar to server, the only difference is that it is just a broker that needs to submit/be submitted to the server for the collected data.
Zabbix_java_gateway
A feature introduced after the zabbix2.0. As the name implies: Java gateway, similar to AGENTD, but only for the Java aspect. It is important to note that it can only proactively fetch data, not passively. Its data will eventually be given to the server or proxy.

Installation Environment:

MySQL 5.6.26
Tentine 2.11
PHP 5.6.9

Above this environment how to install does not introduce, oneself on the net to find a bunch, can yum installs, of course also can source code installs.


two , installing Zabbix servers and clients

1. Get Zabbix

Cd/usr/local/src

wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz

TAR-ZXVF zabbix-2.4.5.tar.gz
CD zabbix-2.4.5


2, yum installation Zabbix need to rely on the library
Yum-y Install Net-snmp-devel Curl-devel

./configure–prefix=/usr/local/zabbix-2.4.5/–enable-server–enable-agent–with-mysql–with-net-snmp–with-libcurl– With-libxml2
Make && make install
Now Zabbix is installed in the/usr/local/zabbix-2.4.5/.


3. The following need to create the Zabbix user and initialize the database.

Groupadd Zabbix

Useradd-g Zabbix zabbix-s/sbin/nologin

mysql-uroot-p222222
Mysql> CREATE database Zabbix character Set UTF8 collate utf8 bin;
Mysql> grant all privileges on zabbix.* to [email protected] '% ' identified by ' zabbix123′;
mysql-uroot-p222222 Zabbix </usr/local/src/zabbix-2.4.5/database/mysql/schema.sql
mysql-uroot-p222222 Zabbix </usr/local/src/zabbix-2.4.5/database/mysql/images.sql
mysql-uroot-p222222 Zabbix </usr/local/src/zabbix-2.4.5/database/mysql/data.sql


4, modify the Zabbix configuration file

Server-side configuration files

cat/usr/local/zabbix-2.4.5/etc/zabbix_server.conf | Egrep-v ' ^#|^$ '

Logfile=/tmp/zabbix_server.log
Dbhost=localhost
Dbname=zabbix
Dbuser=zabbix
Dbpassword=zabbix123
Dbsocket=/usr/local/mysql/jk/mysql.sock
dbport=3306


Native Client Configuration

cat/usr/local/zabbix-2.4.5/etc/zabbix_agentd.conf | Egrep-v ' ^#|^$ '

Logfile=/tmp/zabbix_agentd.log
server=154.1.1.37
serveractive=154.1.1.37
Hostname=web00


5. Start the local server and agent

Systemctl Start Zabbix_server

Systemctl Start Zabbix_agentd


6, the server and client can be debugged through/tmp/zabbix* log file. If the boot succeeds, the service listens on the port.
NETSTAT-TULNP | grep Zabbix
TCP 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 18235/zabbix_agentd
TCP 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 18127/zabbix_server

lsof-i:10050

[[email protected] etc]# lsof-i:10050
command    pid   USER   FD    TYPE DEVICE size/off NODE NAME
Zabbix_ag 1105 zabbix    4u  ipv4  17462 & nbsp;    0t0  TCP *:zabbix-agent (LISTEN)
Zabbix_ag 1115 zabbix    4u  IPv4   17462      0t0  TCP *:zabbix-agent (LISTEN)
Zabbix_ag 1117 zabbix     4u  ipv4  17462      0t0  TCP *:zabbix-agent (LISTEN)
Zabbix_ag 1120 zabbix    4u  ipv4  17462      0t0  TCP *:zabbix-agent (LISTEN )
Zabbix_ag 1121 zabbix    4u  ipv4  17462      0t0  TCP *: Zabbix-agent (LISTEN)
Zabbix_ag 1122 zabbix    4u  ipv4  17462       0t0  TCP *:zabbix-agent (LISTEN)

[Email protected] sbin]# lsof-i:10051
COMMAND PID USER FD TYPE DEVICE size/off NODE NAME
Zabbix_se 21627 Zabbix 4u IPv4 8534867 0t0 TCP *:zabbix-trapper (LISTEN)
Zabbix_se 21629 Zabbix 4u IPv4 8534867 0t0 TCP *:zabbix-trapper (LISTEN)
Zabbix_se 21630 Zabbix 4u IPv4 8534867 0t0 TCP *:zabbix-trapper (LISTEN)
Zabbix_se 21631 Zabbix 4u IPv4 8534867 0t0 TCP *:zabbix-trapper (LISTEN)
Zabbix_se 21632 Zabbix 4u IPv4 8534867 0t0 TCP *:zabbix-trapper (LISTEN)


Third, Configure the Zabbixweb service
Let's install the Web program. You can manage Zabbix through the web.
Cp-a/usr/local/src/zabbix-2.4.5/frontends/php/*/usr/local/nginx/html/zabbix

Chown-r Www:www/usr/local/nginx/html/zabbix
OK, try again. Access the Web server through a browser.
The Zabbix Web Setup Wizard should appear and follow the prompts. If you check the environment in the second step, some PHP configuration parameters are not right. For example: 650) this.width=650; "title=" 22.jpg "src="/http S2.51cto.com/wyfs02/m01/77/b2/wkiom1zsa16ysgtvaahbhtamvmu610.jpg "alt=" Wkiom1zsa16ysgtvaahbhtamvmu610.jpg "/>

Then modify the/etc/php.ini to find the corresponding parameter, modify to the desired value, and then start the Nginx service is OK.

After the Web installation is complete, log in using the Admin/zabbix default Admin account (case-sensitive).

Iv. Adding an additional monitoring client separately

That is, after the installation of Zabbix-agent installation, the Web interface to add the monitoring host on the line.
Cd/usr/local/src
wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz

TAR-ZXVF zabbix-2.4.5.tar.gz
CD zabbix-2.4.5
./configure–prefix=/usr/local/zabbix-2.4.5/–enable-agent
Make && make install

Modifying a configuration file

[Email protected]/]# cat/usr/local/zabbix-2.4.5/etc/zabbix_agentd.conf | Egrep-v ' ^#|^$ '
Logfile=/tmp/zabbix_agentd.log
server=154.1.1.37
serveractive=154.1.1.37
Hostname=web00

Start the service
#/USR/LOCAL/ZABBIX-2.4.5/SBIN/ZABBIX_AGENTD

Then, in the Web console, add the host to the configuration,hosts.

At this, a perfectly formed Zabbix ran up. The rest is like setting up and tuning the monitor.


This article is from the "59090939" blog, please be sure to keep this source http://59090939.blog.51cto.com/6338052/1722339

Centos7.0 installation zabbix2.4.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.