[数仓]八、离线数仓(zabbix集群监控)

第1章 Zabbix入门

1.1 Zabbix概述

Zabbix是一款能够监控各种网络参数以及服务器健康性和完整性的软件。Zabbix使用灵活的通知机制,允许用户为几乎任何事件配置基于邮件的告警。这样可以快速反馈服务器的问题。基于已存储的数据,Zabbix提供了出色的报告和数据可视化功能。

1.2 Zabbix 基础架构

第2章 Zabbix部署

2.1 集群规划

进程

hadoop102节点

hadoop103节点

hadoop104节点

zabbix-agent

zabbix-server

MySQL

zabbix-web

2.2 准备工作

2.2.1 关闭集群

如果集群开启,先关闭集群。因为安装Zabbix前,需要重启虚拟机。

[seven@hadoop102 ~]$ cluster.sh stop

2.2.2 关闭防火墙(3台节点,已关闭)

[seven@hadoop102 ~]$ sudo service iptables stop
[seven@hadoop102 ~]$ sudo chkconfig iptables off

[seven@hadoop103 ~]$ sudo service iptables stop
[seven@hadoop103 ~]$ sudo chkconfig iptables off

[seven@hadoop104 ~]$ sudo service iptables stop
[seven@hadoop104 ~]$ sudo chkconfig iptables off

2.2.3 关闭SELinux(hadoop102)

1)修改配置文件/etc/selinux/config

[seven@hadoop102 ~]$ sudo vim /etc/selinux/config

修改如下内容

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

2)重启服务器

[seven@hadoop102 ~]$  sudo reboot

2.3 配置Zabbix yum源(3台节点)

2.3.1 安装yum仓库

1)安装zabbix的yum仓库

[seven@hadoop102 ~]$ sudo rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

[seven@hadoop103 ~]$ sudo rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

[seven@hadoop104 ~]$ sudo rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

2)安装Software Collections仓库

[seven@hadoop102 ~]$ sudo yum install -y centos-release-scl
[seven@hadoop103 ~]$ sudo yum install -y centos-release-scl
[seven@hadoop104 ~]$ sudo yum install -y centos-release-scl

2.3.2 修改zabbix仓库配置文件

hadoop102、hadoop103、hadoop104三台节点,依次执行如下步骤。

1)修改为阿里云镜像

(1)查看原始zabbix.repo文件

[seven@hadoop102 ~]$ sudo cat /etc/yum.repos.d/zabbix.repo

查看内容如下      

[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/debuginfo/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值