Install Zabbix 3.4
Install Zabbix 3.4 which is an enterpriseopen source monitoring system.It's possible to monitor not only Linuxbut Windows, Solaris, IBM AIX and others.
On this example, It based on that SELinux is Permissive or Disabled.
Install Apache httpd, refer to here.
Install PHP, refer to here.
Install MariaDB server, refer to here.
Install some other required packages and Zabbix repository.
#
yum -y install php-mysql php-gd php-xml php-bcmath
#
yum -y install http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
Install Zabbix server.#
yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent
Create a database for Zabbix.#
mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.52-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database zabbix;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to zabbix@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to zabbix@'%' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit
Bye
#
cd /usr/share/doc/zabbix-server-mysql-*/
#
gunzip create.sql.gz
#
mysql -u root -p zabbix < create.sql
Enter password:
Configure and start Zabbix Server.#
vi /etc/zabbix/zabbix_server.conf
# line 90: add
DBHost=localhost
# line 124: add DB password for Zabbix
DBPassword=password
#
systemctl start zabbix-server
#
systemctl enable zabbix-server
If Firewalld is running, allow Zabbix related ports.#
firewall-cmd --add-service={http,https} --permanent
success
#
firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
success
#
firewall-cmd --reload
success
Configure and start Zabbix Agent to monitor Zabbix Server itself.#
vi /etc/zabbix/zabbix_agentd.conf
# line 97: specify Zabbix server
Server=
127.0.0.1
# line 138: specify Zabbix server
ServerActive=
127.0.0.1
# line 147: change to the own hostname
Hostname=
dlp.srv.world
#
systemctl start zabbix-agent
#
systemctl enable zabbix-agent
Change httpd settings like follows.#
vi /etc/httpd/conf.d/zabbix.conf
# line 10: add access permittion for Zabbix Web frontend
#
Require all granted
Require ip 127.0.0.1 10.0.0.0/24
# line 19: uncomment and change to your timezone
php_value date.timezone
Asia/Tokyo
#
systemctl restart httpd
Zabbix 3.4 : Initial Setup
This is the Initial Setup for Zabbix server.
Access to the from a client which is in the network allowed by Zabbix server. Then, Zabbix start page is displayed, Click to proceed.Make sure all items are , then proceed to next.This is the databse settings section. Change the default setting on field to and input DB password for it.This is the connection settings to Zabbix server. If it's local one, it's OK with keeping default. But It had better to change field to any name you like.This is the confirmation of previous settings, proceed to next if all is OK.Click to complete initial setup.This is the login page. It's possible to login with the username , initial password .Just logined. This is the index of Zabbix administration site. Zabbix 3.4 : Change admin password
Change admin password first. And also set admin email address for notifications.
Login to Zabbix admin site with admin user and click the human-icon which is on the upper-right.Click .Input a password you'd like to change and click to change password. By the way, this example is English displayed but if you'd like to change display language, it's possible to select it on field.Come to the screen again and move to tab and click button.Input an admin email address and click button.Click button to finish. Zabbix 3.4 : Set Monitoring Target Host
Set Monitoring Target Host.
Login to Zabbix admin site with admin user and click - . The localhost which Zabbix Agent has been installed is displayed like follows, check a box on it and click button.The is turned to and the server is monitored.After few miniutes later, monitoring data is collected like follows. The following screen is on - . Zabbix 3.4 : Set SMTP for Notifications
Set SMTP server to send mail notifications.
Login to Zabbix admin site with admin user and move to - tab and then, click button.Set SMTP server's info you'd like to use like follows and click button.Make sure SMTP server is normally changed on Details field. Zabbix 3.4 : Notification email setting
Many items are configured on the defaults' template but it's not set to send notifications by default, so set it like follows.
Set Zabbix admin's email address, and Set SMTP server setting first.
Login to Zabbix admin site with admin user and move to - tab. An action which notifications are sent is defined by default like follows, so click to turn .Notifications are enabled. Default recipients is just the Zabbix admin group.If a value is over from a value set as a threshold, a notification is sent like following example.
From root@localhost.srv.worldFri Aug 25 18:05:01 2017
Return-Path:
X-Original-To: root@localhost
Delivered-To: root@localhost.srv.world
From:
To:
Date: Fri, 25 Aug 2017 19:05:01 +0900
Subject: Problem: Zabbix agent on Zabbix server is unreachable for 5 minutes
Content-Type: text/plain; charset="UTF-8"
Status: R
Problem started at 19:05:00 on 2017.08.25
Problem name: Zabbix agent on Zabbix server is unreachable for 5 minutes
Host: Zabbix server
Severity: Average
Original problem ID: 18
To click the action name, it can see details.It's possible to edit notification messages on tab.It's possible to edit recovery messages on tab.
页:
[1]