zabbix 5.0 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