Install Zabbix 3.4

Install Zabbix 3.4 which is an enterprise
open source monitoring system.

It's possible to monitor not only Linux
but Windows, Solaris, IBM AIX and others.

[1]
On this example, It based on that SELinux is Permissive or Disabled.

[2]
Install Apache httpd, refer to here.

[3]
Install PHP, refer to here.

[4]
Install MariaDB server, refer to here.

[5] Install some other required packages and Zabbix repository.

[[email protected] ~]#

yum -y
 install php-mysql php-gd php-xml php-bcmath

[[email protected] ~]#

yum -y
 install http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm

[6] Install Zabbix server.

[[email protected] ~]#

yum -y
 install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent

[7] Create a database for Zabbix.

[[email protected] ~]#

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   [email protected]'localhost' identified by 'password';

Query OK, 0 rows affected   (0.00 sec)

MariaDB [(none)]>

grant all privileges on zabbix.* to [email protected]'%'   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

[[email protected] ~]#

cd /usr/share/doc/zabbix-server-mysql-*/

[[email protected] zabbix-server-mysql-3.4.0]#

gunzip create.sql.gz

[[email protected] zabbix-server-mysql-3.4.0]#

mysql -u root -p zabbix < create.sql

Enter password:

[8] Configure and start Zabbix Server.

[[email protected] ~]#

vi /etc/zabbix/zabbix_server.conf

# line 90: add

DBHost=localhost

# line 124: add DB password for Zabbix

DBPassword=password

[[email protected] ~]#

systemctl start
 zabbix-server

[[email protected] ~]#

systemctl enable
 zabbix-server

[9] If Firewalld is running, allow Zabbix related ports.

[[email protected] ~]#

firewall-cmd --add-service={http,https}
 --permanent

success

[[email protected] ~]#

firewall-cmd --add-port={10051/tcp,10050/tcp}
 --permanent

success

[[email protected] ~]#

firewall-cmd --reload

success

[10] Configure and start Zabbix Agent to monitor Zabbix Server itself.

[[email protected] ~]#

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

[[email protected] ~]#

systemctl start
 zabbix-agent

[[email protected] ~]#

systemctl enable
 zabbix-agent

[11] Change httpd settings like follows.

[[email protected] ~]#

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

[[email protected] ~]#

systemctl restart
 httpd

Zabbix 3.4 : Initial Setup

This is the Initial Setup for Zabbix server.

[1] Access to the [http://(Zabbix server's hostname or IP address)/zabbix/] from a client which is in the network allowed by Zabbix server. Then, Zabbix start page is displayed, Click [Next step] to proceed.
[2] Make sure all items are [OK], then proceed to next.
[3] This is the databse settings section. Change the default setting on [User] field to [zabbix] and input DB password for it.
[4] 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 [Name] field to any name you like.
[5] This is the confirmation of previous settings, proceed to next if all is OK.
[6] Click [Finish] to complete initial setup.
[7] This is the login page. It's possible to login with the username [admin], initial password [zabbix].
[8] 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.

[1] Login to Zabbix admin site with admin user and click the human-icon which is on the upper-right.
[2] Click [Change Password].
[3] Input a password you'd like to change and click [Update] 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 [Language] field.
[4] Come to the [Profile] screen again and move to [Media] tab and click [Add] button.
[5] Input an admin email address and click [Add] button.
[6] Click [Update] button to finish.

Zabbix 3.4 : Set Monitoring Target Host

Set Monitoring Target Host.

[1] Login to Zabbix admin site with admin user and click [Configuration] - [Hosts]. The localhost which Zabbix Agent has been installed is displayed like follows, check a box on it and click [Enable] button.
[2] The [Status] is turned to [enabled] and the server is monitored.
[3] After few miniutes later, monitoring data is collected like follows. The following screen is on [Monitoring] - [Screens].

Zabbix 3.4 : Set SMTP for Notifications

Set SMTP server to send mail notifications.

[1] Login to Zabbix admin site with admin user and move to [Administration] - [Media Types] tab and then, click [Email] button.
[2] Set SMTP server's info you'd like to use like follows and click [Update] button.
[3] 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.

[1]
Set Zabbix admin's email address, and Set SMTP server setting first.

[2] Login to Zabbix admin site with admin user and move to [Configuration] - [Actions] tab. An action which notifications are sent is defined by default like follows, so click [Disabled] to turn [Enabled].
[3] Notifications are enabled. Default recipients is just the Zabbix admin group.
[4] If a value is over from a value set as a threshold, a notification is sent like following example.


From [email protected]  Fri Aug 25 18:05:01 2017
    Return-Path: <[email protected]>
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    From: <[email protected]>
    To: <[email protected]>
    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

[5] To click the action name, it can see details.
[6] It's possible to edit notification messages on [Operations] tab.
[7] It's possible to edit recovery messages on [Recovery Operations] tab.

原文地址:http://blog.51cto.com/2833481/2102940

时间: 2024-10-10 23:58:39

Install Zabbix 3.4的相关文章

yum install zabbix

环境: centos 6.5 下载并安装epel源 links  http://fedoraproject.org/wiki/EPEL rpm -ivh epel-* 2.安装amp环境 yum install httpd mysql mysql-server php php-mysql -y 3.安装zabbix yum install zabbix22.x86_64 zabbix22-agent.x86_64 zabbix22-server.noarch zabbix22-server-my

How to Install Zabbix Agent on Windows System

Zabbix Agent is installed on remote systems needs to monitor through Zabbix server. The Zabbix agent collects resource utilization and applications data on client system and provide such information to zabbix server on their requests. This article wi

install zabbix

#yum install maridb and php apacheyum install make httpd php mysql-devel gcc net-snmp-devel curl-devel perl-DBI php-fpm php-gd php-mysql php-bcmath php-mbstring php-xml unixODBC-devel OpenIPMI-devel libxml2-devel mariadb mariadb-server -y #add new us

How to install Zabbix on CENTOS 7

when you have installed zabbix , it is important of changing password. How to install Zabbix on CENTOS 7 Setup 1 INSTALL Create the repos of Zabbix rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rp

CENTOS 6.8 INSTALL ZABBIX 3.2

查看自己得数据库版本yum list installed | grep mysql----------------------------------------Expected output:mysql-libs.x86_64    5.1.73-5.el6_6     @anaconda-CentOS-201508042137.x86_64/6.7---------------------------------------- 删除自己得老版本数据库yum remove mysql* 添加新

How to install zabbix 2.4.5 on OEL6u6 x86 64bit

1. 安装依赖包 2. 安装zabbix 3. 设置zabbix 1. 安装依赖包 # yum install OpenIPMI-devel Installed: OpenIPMI-devel.x86_64 0:2.0.16-14.el6 Dependency Installed: OpenIPMI.x86_64 0:2.0.16-14.el6 OpenIPMI-libs.x86_64 0:2.0.16-14.el6 lm_sensors-libs.x86_64 0:3.1.1-17.el6 n

Centos install zabbix

安装PHP.mysqlyum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml mysql-server 更改PHP设置:sed -i "s/;date.timezone =/date.timezone = Asia\/Shanghai/g" /etc/php.inised -i "s#max_execution_time = 30#max_execu

Pyhon install zabbix 4.0

1.安装 MySQLdb 模块;#!/bin/bash#this is rpm python Environment depends onfunction depends_rpm(){yum clean all yum -y install gcc* python-devel python-pip mariadb mariadb-devel mariadb-serverif [ $? -eq 0 ] thenpip install MySQL-python==1.2.5 elseecho "En

python install zabbix.4.0

1.安装 MySQLdb 模块; #!/bin/bash #this is rpm python Environment depends on function depends_rpm(){ yum clean all  yum -y install gcc* python-devel python-pip mariadb mariadb-devel mariadb-server if [ $? -eq 0 ]   then        pip install MySQL-python==1.