zabbix监控配置流程

zabbix客户端部署

[root@localhost ~]# cd /usr/src/
[root@localhost src]# ls
debug  kernels  zabbix-6.2.2  zabbix-6.2.2.tar.gz
[root@localhost src]# scp zabbix-6.2.2.tar.gz 192.168.119.151:/usr/src/
The authenticity of host '192.168.119.151 (192.168.119.151)' can't be established.
ECDSA key fingerprint is SHA256:8ZGjLoS/i5d6O03waHMjHvy0bwcXcFRLZ62y6Un2IQk.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes   
Warning: Permanently added '192.168.119.151' (ECDSA) to the list of known hosts.
root@192.168.119.151's password: 
zabbix-6.2.2.tar.gz                                                           100%   33MB  34.2MB/s   00:00    
[root@localhost src]# 
[root@localhost src]# 





[root@web ~]# 
[root@web ~]# useradd -r -M -s /sbin/nologin zabbix 
[root@web ~]# yum -y install gcc gcc-c++ make vim 
[root@web ~]# cd /usr/src/
[root@web src]# ls
debug  kernels  zabbix-6.2.2.tar.gz
[root@web src]# tar xf zabbix-6.2.2.tar.gz 
[root@web src]# cd zabbix-6.2.2/
[root@web zabbix-6.2.2]# ls
aclocal.m4  build      conf          configure     database  INSTALL     Makefile.am  misc     README  ui
AUTHORS     ChangeLog  config.guess  configure.ac  depcomp   install-sh  Makefile.in  missing  sass
bin         compile    config.sub    COPYING       include   m4          man          NEWS     src
[root@web zabbix-6.2.2]# 
[root@web zabbix-6.2.2]# yum -y install pcre-devel  openssl  openssl-devel 

[root@web zabbix-6.2.2]# ./configure --help |grep agent
  --enable-agent          Turn on build of Zabbix agent and client utilities
  --enable-agent2         Turn on build of Zabbix agent 2
[root@web zabbix-6.2.2]# ./configure --enable-agent
[root@web zabbix-6.2.2]# cd 
[root@web ~]# cd /usr/local/etc/
[root@web etc]# ls
zabbix_agentd.conf  zabbix_agentd.conf.d
[root@web etc]# vim zabbix_agentd.conf
[root@web etc]# 




# Mandatory: yes, if StartAgents is not explicitly set to 0
# Default:
# Server=

Server=192.168.119.150

### Option: ListenPort
#       Agent will listen on this port for connections from the server.
#

# Mandatory: no
# Default:
# ServerActive=

ServerActive=192.168.119.150

### Option: Hostname


# Mandatory: no
# Default:
# Hostname=

Hostname=yuli

### Option: HostnameItem
#       Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
#       Does not support UserParameters or aliases.



#开启客户端
[root@web etc]# zabbix_agentd 
[root@web etc]# ss -anlt
State       Recv-Q       Send-Q             Local Address:Port              Peer Address:Port      Process      
LISTEN      0            128                      0.0.0.0:22                     0.0.0.0:*                      
LISTEN      0            128                      0.0.0.0:10050                  0.0.0.0:*                      
LISTEN      0            128                         [::]:22                        [::]:*                      
[root@web etc]# 

在zabbix网站是添加新主机

添加组机主

添加监控项

用模板方式添加

客户端注意要关闭监控ip的防火墙

[root@web ~]# systemctl stop firewalld.service 
[root@web ~]# vim /etc/se
security/       selinux/        services        sestatus.conf   setroubleshoot/ 
[root@web ~]# vim /etc/selinux/config 
[root@web ~]# 
[root@web ~]# setenforce 0
[root@web ~]# getenforce 
Permissive

手动添加监控项

创建监控文件

[root@web ~]# cd /tmp/
[root@web tmp]# ls
systemd-private-fac3fd50dd5340199ca8e13c7d818f32-chronyd.service-cLk6Q6  zabbix_agentd.log
vmware-root_931-3988621659                                               zabbix_agentd.pid
vmware-root_935-3980298462
[root@web tmp]# touch asd
[root@web tmp]# ll asd
-rw-r--r--. 1 root root 0 Sep  5 20:55 asd
[root@web tmp]# 

添加触发器

添加媒介

手动触发告警

随便写入数据

[root@web ~]# echo 123456 >> /tmp/asd 
[root@web ~]# echo 123456 >> /tmp/asd 

windos 部署zabbix 监控

先下载zabbix_agentd包

添加监控主机

暂停对Windows主机监控

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值