19.1 Linux Monitoring Platform Introduction
19.2zabbix Monitoring Introduction
19.319.419.6 Mounting Zabbix
Prepare 2 machines, one server is a client
Both machines have to release-3.2-1.el7.noarch.rpm the bag.
RPM-IVH zabbix-release-3.2-1.el7.noarch.rpm
The following are server-side operations:
Yum install-y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql
If MySQL is not installed before, you will need to install MySQL according to the MySQL installation method in the lamp chapter.
Check to see if MySQL is up or not, start up.
PS aux |grep MySQL
Vim/etc/my.cnf
Add Chinese character string
Restart under service: systemctl restart MySQL
Go to MySQL Library
Mysql-uroot-paminglinux
Create a library and specify the UTF8 type
Create database Zabbix character set UTF8;
Re-create User
Grant all on zabbix.* to ' Zabbix ' @ ' 127.0.0.1 ' identified by ' Aming-zabbix ';
Then exit the Library
Import data
cd/usr/share/doc/zabbix-server-mysql-3.2.7
Gzip-d create.sql.gz
Mysql-uroot-pxxx Zabbix < Create.sql
Before starting the related service httpd service, to see if the Nginx service is started, because it occupies 80 port, to stop its service
Stop Nginx Service systemctl disable Nginx
No open to start chkconfig nginx off
Start the httpd service
Systemctl Start httpd
Systemctl Enable httpd
Check the 80 port is not listening, this time httpd has been listening to 80 ports
Open Zabbix Service
? Systemctl Start Zabbix-server
? Systemctl Enable Zabbix-server
? NETSTAT-LNTP |grep Zabbix//view listening port
The service started but did not listen on the port, indicating a problem
View Log less/var/log/zabbix/zabbix_server.log, found not connected to MySQL
Change the configuration file
Vim/etc/zabbix/zabbix_server.conf
Search/DBH
dbhost=127.0.0.1//Increase on Dbname=zabbix
If MySQL is not on the same server, then dbhost=127.0.0.1 will write the IP on the machine that actually installed the MySQL
Dbpassword=aming-zabbix//Add below Dbuser
Reboot, please.
Systemctl Restart Zabbix-server
Look at the service again, start a lot of processes
Check that the listening port is 10051
Next, enter the IP 192.168.137.129/zabbix of the Monitoring Center on the browser
And then next, the right test is OK.
PHP option "Date.timezone" prompt failed to modify php.ini default in/etc/php.ini
Vi/etc/php.ini
Search/timezone
Define it, please.
Restart the httpd service
Systemctl Restart httpd
Refresh your browser and you'll be OK.
Continue to the next step, fill in the information, Port 0 refers to the default is 3306
Password: Aming-zabbix
Next, define the hostname, you can define it casually
Next
Next
Log in when you are done default Admin User: admin password: Zabbix
Log in first to change the password, password changes to liang.123 can also be changed language
19.5 forgot admin password how to do
Go to MySQL and use the Usezabbix library
Enter show tables; Take a look at the tables in the table, these tables with the increase in data will be more and more large, need to make rules station data retention how long
Passwords remain in the users table
Look at the Users table field
Change Password
Update users set PASSWD=MD5 (' newpasswd ') where alias= ' Admin ';
To view the contents of the Users table, click Admin Guest 2 users
It's time to log in with a new password on the browser.
19.6. Zabbix Client Installation
When you are finished installing
Vim/etc/zabbix/zabbix_agentd.conf
Search/server default is native
Modify the following configuration
server=127.0.0.1 modified to server=192.168.133.130//define the IP of the server (passive mode)
Go down and find serveractive=127.0.0.1. Modify the IP (active mode) for serveractive=192.168.133.130//definition Server
Search/hostname down to find
Hostname=zabbix Server modified to hostname=aming-123//This is a custom hostname, and you will need to set the same host name under the Web interface.
The host name here is the host name of the client you want to monitor, if you define a name, the server will not recognize, do not know that a client computer
Systemctl Start Zabbix-agent
Systemctl Enable Zabbix-agent
Check out the service
Take a look at the listening port, it's 10050.
The installation is complete here.
19.1-6linux Monitoring Platform Introduction Zabbix monitoring Introduction installation Zabbix forgot admin password how to do