Understanding of the Zabbix Discovery (LLD)
First, the main usage, please refer to the official website document Https://www.zabbix.com/documentation/2.2/manual/discovery/low_level_discovery Understanding: 1, Server and agent or SNMP fixed time to communicate 1 times to obtain data. 2, the processing return value, usually is a JSON format k/v dictionary,k/v maps to the macro, uses the macro and the prototypes cycle to increase the items,triggers and so on content. 3, usually is defined on a template, directly create a host template, waiting for LLD auto discovery. 4, Zabbix with 3 kinds of macro definition:discovery of file systems: {#FSNAME}, {#FSTYPE}discovery of network interfaces: {#IFNAME}discovery of snmp oids: {#SNMPINDEX}, {#SNMPVALUE} II, QA "Q": How Zabbix uses the snmp in LLD OIDs to obtain the data of a: Carefully read the official website document can be found that the Zabbix for SNMP has been defined within the relevant macro, direct use can. (view: 3.3 discovery of snmp oids) LLD can generate 2 macros: {#SNMPINDEX} when acquiring an entity of SNMP {#SNMPVALUE} Take this as an example:# snmpwalk -v 2c -c public 10.10.10.109 1.3.6.1.4.1.674.10892.5.5.1.20.130.4.1.2 snmpv2-smi::enterprises.674.10892.5.5.1.20.130.4.1.2.1 = string: "physical disk 0:1:0" SNMPv2-SMI:: enterprises.674.10892.5.5.1.20.130.4.1.2.2 = string: "Physical disk 0:1:1" SNMPv2-SMI: :enterprises.674.10892.5.5.1.20.130.4.1.2.3 = string: "Physical disk 0:1:2" {# Snmpindex} Gets the last value in the string oid of 1.3.6.1.4.1.674.10892.5.5.1.20.130.4.1.2, {#SNMPVALUE} will get the corresponding value. In other words, {#SNMPINDEX} -> 1,{#SNMPVALUE} -> "physical disk 0:1:0" {#SNMPINDEX} -> 2,{#SNMPVALUE} -> "physical disk 0:1:1" {#SNMPINDEX} -> 3, {#SNMPVALUE} -> "physical disk 0:1:2" and then we get each value obtained by item prototypes, for example:key: Diskstatus. [{#SNMPINDEX}] snmp oid: 1.3.6.1.4.1.674.10892.5.5.1.20.130.4.1.24. {#SNMPINDEX} The corresponding data is:# snmpwalk -v 2c -c public 10.10.10.109 1.3.6.1.4.1.674.10892.5.5.1.20.130.4.1.24.1snmpv2-smi::enterprises.674.10892.5.5.1.20.130.4.1.24.1 = integer: 3 three, application 1, monitoring switch direct template "Template snmp interfaces" can be. Wherein, LLD uses this OID (IF-MIB::IFDESCR) to obtain network card information, for example: # snmpwalk -v 2c -c public 10.0.200.1 if-mib::ifdescrif-mib::ifdescr.1 = string: gigabitethernet1/0/1if-mib::ifdescr.2 = string: gigabitethernet1/0/2if-mib::ifdescr.3 = string: gigabitethernet1/0/3if-mib:: IFDESCR.4 = STRING: GIGABITETHERNET1/0/4 (slightly) combines {#SNMPVALUE} to take a value, for example: "Item prototype", " Outgoing traffic on interface $1 "We note that the key: ifoutoctets[{#SNMPVALUE}]snmp oid: if-mib::ifoutoctets. {#SNMPINDEX} corresponds to the result is:# snmpwalk -v 2c -c public 10.0.200.1 ifoutoctets.1if-mib::ifoutoctets.1 = counter32: 305669896 is:ifoutoctets[1] = 3056698962. Monitoring Dell's Idrac reference: Https://github.com/endersonmaia/zabbix-templates
Understanding of the Zabbix Discovery (LLD)