设为首页 加入收藏

TOP

zabbix监控详解(一)
2023-07-23 13:32:53 】 浏览:45
Tags:zabbix

zabbix监控详解


本章是基于zabbix的基础使用监控服务zabbix部署基础之上.
本章进行的操作是zabbix监控linux,windows以及配置邮件告警

环境 IP 要安装的服务
服务器 192.168.222.250 lamp架构
zabbix server
zabbix agent
客户端 192.168.222.251 zabbix agent

在web界面进行linux部署agentd

zabbix客户端部署
zabbix6.2源码包

[root@localhost ~]# cd /usr/local/etc/
[root@localhost etc]# useradd -rMs /sbin/nologin zabbix
//创建zabbix用户
[root@localhost etc]# cd /usr/src/
[root@localhost src]# wget https://cdn.zabbix.com/zabbix/sources/stable/6.2/zabbix-6.2.2.tar.gz
//下载源码包
[root@localhost src]# ls
debug  kernels  zabbix-6.2.2.tar.gz
[root@localhost src]# tar xf zabbix-6.2.2.tar.gz  //解压
[root@localhost src]# cd zabbix-6.2.2/
[root@localhost zabbix-6.2.2]# dnf -y install openssl-devel pcre-devel expat-devel gcc gcc-c++ make
//安装依赖包
[root@localhost zabbix-6.2.2]# ./configure --enable-agent
//编译
....
***********************************************************
*            Now run 'make install'                       *
*                                                         *
*            Thank you for using Zabbix!                  *
*              <http://www.zabbix.com>                    *
***********************************************************
[root@localhost zabbix-6.2.2]# make install
//安装
[root@localhost zabbix-6.2.2]# cd /usr/local/etc/
[root@localhost etc]# ls
zabbix_agentd.conf  zabbix_agentd.conf.d
[root@localhost etc]# vim zabbix_agentd.conf
//修改配置文件
Server=192.168.222.250   //服务端ip
ServerActive=192.168.222.250  //服务端ip
Hostname=Zabbix xbz  //zabbix系统内主机名,可自定义,但要确保唯一性
[root@localhost etc]# ldconfig  //刷新配置
[root@localhost etc]# zabbix_agentd  //启动zabbix_agentd
[root@localhost etc]# ss -antl   //查看端口
State     Recv-Q    Send-Q         Local Address:Port          Peer Address:Port    Process    
LISTEN    0         128                  0.0.0.0:10050              0.0.0.0:*                  
LISTEN    0         128                  0.0.0.0:22                 0.0.0.0:*                  
LISTEN    0         128                     [::]:22                    [::]:*                  

创建监控主机

点击右上角的创建

设置好后点右下角的添加

创建主机组并加入主机



添加监控项

用模板方式添加


此处需要关闭客户端的防火墙

[root@localhost ~]# systemctl stop firewalld.service 
[root@localhost ~]# vim /etc/selinux/config 
[root@localhost ~]# cat /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 three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted


[root@localhost ~]# systemctl status firewalld.service 
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2022-09-05 22:26:01 CST; 34s ago
     Docs: man:firewalld(1)
  Process: 634412 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited,>
 Main PID: 634412 (code=exited, status=0/SUCCESS)

Sep 05 21:54:24 localhost systemd[1]: Starting firewalld - dynamic firewall daemon...
Sep 05 21:54:25 localhost systemd[1]: Started firewalld - dynamic firewall daemon.
Sep 05 21:54:25 localhost firewalld[634412]: WARNING: AllowZoneDrifting is enabled. This is co>
Se
首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇CentOS 7替换默认软件源 下一篇踩坑之旅:配置 ROS 环境

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目