Zabbix 2019/10/12 Chenxin refer to Introduction Zabbix is an enterprise-level open source solution that provides distributed system monitoring and network monitoring capabilities based on a WEB interface. Zabbix can monitor various network parameters to ensure the safe operation of the server system; and provide a flexible notification mechanism to allow system administrators to quickly locate/solve various existing 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 on Linux, Solaris, HP-UX, AIX, Free BSD, Open BSD, OS X and other platforms. Similar products include Grafana, Nagios, Ganglia, Open-Falcon, etc. Server Installation and Deployment Refer to https://www.zabbix.com/download?zabbix=4.4&os_distribution=centos&os_version=8&db=mysql for installation and connection instructions The latest Zabbix-4.4 version is installed here. This experiment address description Server: 192.168.143.130 1. Choose a platform Select the Zabbix version/OS type/OS version/Database type, etc. Then different installation and connection instructions will be given according to the user's selection. Here we take Zabbix4.4, Centos7, MySQL database as an example. 2. Install according to the above selection a. Install Zabbix source rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm #Load the source of zabbix yum clean all ls /etc/yum.repos.d/ ... zabbix.repo #Add this file b. Install Zabbix server, frontend, agent # yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent (zabbix components, may need to be executed multiple times due to network speed issues) Error 1. Delta RPMs disabled because /usr/bin/applydeltarpm not installed. This indicates that deltarpm is not installed. Run the command to view the package information. yum provides '*/applydeltarpm' #Check the location of the dependent package, the prompt is as follows deltarpm-3.6-3.el7.x86_64: Create deltas between rpms #Prompts the package to be installed deltarpm-3.6-3.el7.x86_64 Repo: @base Matched from: Filename : /usr/bin/applydeltarpm Execute the installation command If it still happens, it means that it is caused by network problems (the speed is too slow), then try multiple times (each time you download, the progress will increase and enter the cache) c. Initialize the database and import the table structure Initialize the database (MySQL version is 5.7) create database zabbix character set utf8 collate utf8_bin; CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'sj...sg'; CREATE USER 'zabbix'@'%' IDENTIFIED BY 'sj...sg'; GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'%'; GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@localhost; Importing data structures # zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix d. Modify the DB configuration file of zabbix server vim /etc/zabbix/zabbix_server.conf DBHost=192.168.143.130 DBPassword=xxx DBPort=10306 DBSocket=/tmp/mysql.sock e. Modify the PHP configuration file on the front end of the zabbix server vim /etc/httpd/conf.d/zabbix.conf, uncomment and set the correct time zone (Asia/Shanghai) php_value date.timezone Europe/Riga f. Start the Zabbix server and Agent process. Set it to start automatically at boot. Start the service # systemctl restart zabbix-server zabbix-agent httpd The actual call is /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf /usr/sbin/httpd Set up auto-startup # systemctl enable zabbix-server zabbix-agent httpd Process open port description zabbix_agentd 10050 zabbix_server 10051 httpd 80 After the above steps, zabbix is running. Configure Zabbix frontend (frontend entry configuration) http://192.168.143.130/zabbix For configuration methods, please refer to https://www.zabbix.com/documentation/4.4/manual/installation/install#installing_frontend for screenshots of front-end configuration. Or follow the following process (same as the official website). Process Description 1. Enter the welcome page 2. Confirm whether all relevant plug-ins have been installed. If there are any unfinished ones, you can install them manually. 3. Enter the DB configuration interface and enter the IP, PORT, dbname, username, and password of the Zabbix database. 4. Enter the relevant information of zabbix server (host name/IP, open port 10051, Name can be empty). After completion, the page prompts as follows Congratulations! You have successfully installed Zabbix frontend. Configuration file "/etc/zabbix/web/zabbix.conf.php" created. <?php // Zabbix GUI configuration file. global $DB; $DB['TYPE'] = 'MYSQL'; $DB['SERVER'] = '192.168.143.130'; $DB['PORT'] = '10306'; $DB['DATABASE'] = 'zabbix'; $DB['USER'] = 'zabbix'; $DB['PASSWORD'] = 'sj...sg'; // Schema name. Used for IBM DB2 and PostgreSQL. $DB['SCHEMA'] = ''; $ZBX_SERVER = '192.168.143.130'; $ZBX_SERVER_PORT = '10051'; $ZBX_SERVER_NAME = ''; $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; First login Log in to zabbix web for the first time, account Admin (note the capital "A"), password zabbix. Using Zabbix https://www.zabbix.com/documentation/4.4/manual/quickstart/login There are also video tutorials. Mainly for monitoring project viewing. Creation of DashBoard. Adding clients. After the client is shut down, "Monitoring"->"Instrument"/"Problem" all show abnormal descriptions (a host is down). Template usage (association, creation) Alarm use. Zabbix client (agent) separate installation/host creation Monitored host IP: 192.168.143.131 1 Install the Agent rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm yum clean all yum install zabbix-agent -y #Due to network reasons, you may need to execute multiple times 2. Modify the configuration file cat zabbix_agentd.conf |grep -v -E "(^#|^$)" PidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=0 Server=127.0.0.1 #Change to 192.168.143.130 ServerActive=127.0.0.1 #Change to 192.168.143.130 Hostname=Zabbix server # This can be changed to other names Include=/etc/zabbix/zabbix_agentd.d/*.conf 3. Configure the host on zabbix-web Select "Configuration" -> "Hosts" -> "Create Host". Then Select the "Host" column, enter the host name, group (created in advance), host IP and port Select the "Template" column and select the corresponding template (monitoring item). Click "Add". Then go to "Monitoring" -> "Latest Data" to check whether the data acquisition is normal. Zabbix related directories and file descriptions 1. Important directory instructions /etc/zabbix #Contains zabbix_agentd.conf, zabbix_agentd.d/, zabbix_server.conf /etc/httpd/conf.d/zabbix.conf #http configuration /usr/share/zabbix/ #web root directory /var/log/zabbix/ #log storage directory 2. Other related directories (lib directory, man, doc directory omitted) /usr/lib/systemd/system/zabbix-server.service,zabbix-agent.service #Service /usr/sbin/zabbix_server,zabbix_server_mysql,zabbix_agentd #Binary /etc/yum.repos.d/zabbix.repo # Source /etc/logrotate.d/zabbix-server,zabbix-agent #Log rollback method /etc/selinux/targeted/active/modules/100/zabbix/ #Binary/run/zabbix #Run directory User Management Supports management of local users and groups. Support LDAP, the specific configuration is omitted. Call the police Support Mail/GSM-modem (hardware connection to server) mode. Other notes The monitoring page console supports Chinese. Support page theme changes. Summarize The above is the Zabbix monitoring solution introduced by the editor - the official latest 4.4 version. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Analyze how uniapp dynamically obtains the interface domain name
>>: Manually implement js SMS verification code input box
The command format for mysql login is: mysql -h [...
When the user's home directory becomes larger...
When we write pages, we sometimes find that the C...
Table of contents Preliminary preparation Impleme...
Table of contents 1. Docker enables remote access...
In MySQL, most indexes (such as PRIMARY KEY, UNIQ...
Table of contents 1 The role of Apache 2 Apache I...
Brief description <br />In IE6 and 7, in a ...
In desperation, I suddenly thought, how is the Sin...
In the previous article, it was mentioned that th...
Preface As you know, Linux supports many file sys...
Today, I am sharing the valuable experience of a ...
MySQL is a multi-user managed database that can a...
Preface I have seen many articles about the leftm...
This article example shares the specific code of ...