Because before the network equipment is not many, monitoring network device interface directly using the template in the item to achieve, but now the company online a large number of network equipment, if you want each network equipment to do templates, add Item ... Then it's time to get out of it. Test today using Zabbix's Autodiscover feature to automatically discover the network device interface, and automatically obtain the interface traffic value, generate traffic graph and other functions.
In this way can save a lot of time, time is life ah, waste time on the boring Add network interface work is wasting life! Well, nonsense not much to say, to get to the point:
First, the SNMP protocol is configured on the switch, and for the sake of simplicity, the SNMP v2 protocol is currently in use. This does not repeat how the SNMP V2 protocol is configured on the switch, the previous blog has described how to configure the SNMP V3 protocol switch configuration, SNMP V2 protocol configuration is simpler.
After configuring the SNMP V2 protocol for the switch, it is necessary to test with the Snmpwalk command on the Zabbix server to see if the data can be obtained. The command is as follows:snmpwalk-v 2c-c xxx 10.1.1.1 ifdescr where xxx is the community name of the SNMP set in the switch.
After the test can get the data, the next step is to create the template on the Web page of the Zabbix server. First create a template in the configuration---template,
Start creating an app set after you've created the template: give the app a name called Interface discovery.
Then you'll start creating discovery rules, click Explore Rules, create discovery rules.
The application is to configure the SNMP V2 community name, the key value using IFDESCR, the SNMP OID can obtain all the interface name of the switch. When the name is obtained, the Autodiscover rule can produce two JSON-formatted data, one {#SNMPVALUE}: The corresponding data is the interface name, and the {#SNMPINDEX}: The corresponding data is the ID of the interface. Also missed a knowledge point, where the data update interval I set 30 seconds, the default is 3,600 seconds, this is worth the size will directly affect the Autodiscover rule discovery device time.
Know this will start to configure the prototype of the project.
The Red arrows above are the places to be noticed, where $ {#SNMPVALUE} values, the following custom multiples and units do not have to explain the rate of conversion to bps. In this way, the in-direction flow auto-discovery rules of the interface are configured, and the traffic auto-discovery rules that configure the interface's out direction in the same way are fine.
below, start defining the generated graphs for Autodiscover, first:
Click on the graphical prototypes, add prototypes, and add the two prototypes you just created, so that a simple Autodiscover rule is configured. The following add the switch, using this template will be able to automatically discover all the interface of the switch, and automatically get all the interface traffic of the switch, generate graphics!
All of the above interfaces are automatically discovered!
At this point, our Zabbix configuration template auto-discovery feature automatically identifies all interfaces of a network device, and gets the traffic values for all interfaces, and the process of generating graphics is complete! Written here for your reference!
This article is from the "Lemon" blog, be sure to keep this source http://xianglinhu.blog.51cto.com/5787032/1675707
Zabbix automatically identify network device interfaces with auto-discovery capabilities