002-Zabbix-网络设备自动监控(cisco)

网络设备都是多端口多监控项目,要是一个一个添加的话,那能能够累人的。本人开始玩zabbix的时候也是一个端口一个端口添加的,搞了很久才添加完一台交换机。忽然想是否是有自动监控交换的方法,经过百度一顿搜索了,找到了好多文章,根据相关文章的查看,终于实现了这个自动监控网络设备的方法php

实现过程:建立Templates-定义Discovery-在Discovery-建立item,Graphsnginx

1,首先建立模板,步骤以下:Configuration-templates-Create template网络

image

2,简单配置一下,把模板的名称,所属组都填写一下,而后点击:ADDapp

image

3.Templates主界面,选择新建立的模板,点击:Discoveryide

image

4.进入Discovery界面,而后选择:Create discovery rule网站

image

5.进入Create discovery rule界面,以下图spa

image

填写内容以下:prototype

Name     #Discovery 名称  名称为:Network interface翻译

Type       #选择agent的模式 选择使用agent:SNMPv2 agent3d

Key         #填写所需的Key值, 由于是自动发现,填写的Key:ifDescr

SNMP OID    #填写SNMP所需的OID值 ,填写的SNMPOID:ifdescr

SNMP community # SNMP团体的名称,多数都是自定义的名称,在这里我使用的是默认的public

填写完成以下图:

image

好了,如今咱们须要建立item,英文:Item prototypes 中文翻译为:原项目

PS:看资料的时候没有详细看是在没有在discovery rule下建立Item prototypes 。那次配置失败,后来对比了一下才找到问题所在,特此在这里提示一下建立item是在Item prototypes 建立。

6.点击打开:Item prototypes

image

7,进入Item prototypes 界面,而后选择:Create item prototype

image

8,进入item prototype界面

image

流量IN与OUT,请参考IN的流量配置out流量的选项

Item prototype名称 名称描述 填写内容
Name Item名称 In traffic on interface {#SNMPVALUE}
Type agent工做模式 SNMPv2 agent
Key 监控KEY值 ifInOctets[{#SNMPVALUE}]
SNMP OID SNMP OID键值 IF-MIB::ifInOctets.{#SNMPINDEX}
SNMP communtiy SNMP团体名称 public
Type of information 获取数据的使用类型 Numeric(unsigned)
Units 获取数据的单位 bps (zabbix默认为byte)
Usecustommultiplier 单位的倍数 8     (byte转换到bps乘8)
store value 存储数值的方式 Delta(speed per second)
Description Item描述 null

关于三个变量值说明,请参考:

本版为:2.4.6

https://www.zabbix.com/documentation/2.4/manual/appendix/macros/supported_by_location?s[]=snmpvalue

InOctets模板

image

OutOctets模板

image

9,建立Graph prototype 监控流量图,点击:Graph prototype

image

10,点击:Create graph prototype

image

11,进入Create graph prototype界面

image

所需配置项:

Name  :Traffic on interface {#SNMPVALUE}

Items

这二项目,配置过程以下图

image

到Items位置,点击:add prototype 添加items prototype

image

勾选,并点击:SELECT

image

配置完成以下图,而后点击:add

image

以上是自动发模板配置完成,如今添加主机并关联相应模板

添加主机:Configuration-Hosts-Create host

image

填写完基本信息后,选择点击:Templates

image

再点击:Select 进入模板选择界面

image

勾选咱们刚刚建立的模板,下拉点击:Select或者 双击也能够返回到模板

image

在Link new templates 位置,已经能够看到咱们选择的模板名称,此时必定要点击:add 进行添加

image

image

最后点击:add 返回到主机界面

image

等待一会就发现原来Item项目0,已经有好多项目

image

而后去查看网络流量图吧

image

到此结束了,网络设备的自动添加端口流量监控

zabbix中文参考网站:https://www.ttlsa.com/monitor/zabbix/

在这个网站我学到了不少知识,如php nginx 我的比较喜欢,在这里感谢网站的建立团队。

相关文章
相关标签/搜索