zabbix 通过 SNMP 协议 监控(详细流程)

SNMP协议

  • snmp主要针对无法使用zabbix agent客户端监控的设备对象
  • 比如监控网络设备,固件
  • 路由器,交换机,打印机,ups,前提是支持snmp协议

MIB

  • MIB:被管理设备的数据通过变量构建成数据库,包含了各种对象集合;
  • 对象集合就是OID

OID

  • OID:官方解释为对象标识符。zabbix的最小单元其实就是监控项,而监控项的取值就是由一个个的OID组成的,他是一个树状结构;
    在这里插入图片描述

snmp流程

在这里插入图片描述

部署snmp监控

客户端(被监控)配置

重新弄一台没有zabbix agent客户端的虚拟机安装snmp源

#被监控主角及下载snmp服务端
[root@localhost ~]# yum install net-snmp -y
#进入到脚本中
[root@localhost ~]# cd /etc/snmp/
[root@localhost snmp]# ls
snmpd.conf  snmptrapd.conf


在这里插入图片描述

更改配置文件

#修改配置文件
[root@localhost snmp]# vim snmpd.conf 

#修改完的文件,根据自己的服务修改
###############################################################################
#
# snmpd.conf:
#   An example configuration file for configuring the ucd-snmp snmpd agent.
#
###############################################################################
#
# This file is intended to only be as a starting point.  Many more
# configuration directives exist than are mentioned in this file.  For
# full details, see the snmpd.conf(5) manual page.
#
# All lines beginning with a '#' are comments and are intended for you
# to read.  All other lines are configuration commands for the agent.

###############################################################################
# Access Control
###############################################################################

# As shipped, the snmpd demon will only respond to queries on the
# system mib group until this file is replaced or modified for
# security purposes.  Examples are shown below about how to increase the
# level of access.

# By far, the most common question I get about the agent is "why won't
# it work?", when really it should be "how do I configure the agent to
# allow me to access it?"
#
# By default, the agent responds to the "public" community for read
# only access, if run out of the box without any configuration file in
# place.  The following examples show you other ways of configuring
# the agent so that you can change the community names, and give
# yourself write access to the mib tree as well.
#
# For more information, read the FAQ as well as the snmpd.conf(5)
# manual page.

####
# First, map the community name "public" into a "sec
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值