zabbix_export: version: '6.0' date: '2021-11-21T21:31:59Z' groups: - uuid: 7df96b18c230490a9a0a9e2307226338 name: Templates templates: - uuid: e1875eafff3d4198bdd1e8e7689aa925 template: 'SNMP Interfaces Huawei' name: 'SNMP Interfaces Huawei' description: | ## Overview Templete para OLT's Huawei MA5600 e outras OLT's menores. Observações: Dentro do servidor zabbix será necessário editar o arquivo "/etc/snmp/snmp.conf" no meu caso o servidor é ubuntu server. Já dentro do arquivo escreva a linha "noRangeCheck yes" caso ela ainda não exista ou caso ela exista basta descomentar, esse passo é importante para que não retorne erro de "index out of range". Os equipamentos da Huawei nas interfaces GPON tem um problema com o MIB-ifAlias e MIB-ifDescr, sempre irão retornar o apelido e descrição das interfaces GPON com o mesmo nome. Assim o zabbix não consegue identifica-las separadamente. Porém o MIB-ifName trás o resultado correto das interfaces, segue os exemplos: IF-MIB::ifDescr.[4194304000](tel:(419)%20430-4000) = STRING: Huawei-MA5600-V800R015-GPON\_UNI IF-MIB::ifDescr.[4194304256](tel:(419)%20430-4256) = STRING: Huawei-MA5600-V800R015-GPON\_UNI IF-MIB::ifDescr.[4194304512](tel:(419)%20430-4512) = STRING: Huawei-MA5600-V800R015-GPON\_UNI IF-MIB::ifName.[4194304000](tel:(419)%20430-4000) = STRING: GPON 0/0/0 IF-MIB::ifName.[4194304256](tel:(419)%20430-4256) = STRING: GPON 0/0/1 IF-MIB::ifName.[4194304512](tel:(419)%20430-4512) = STRING: GPON 0/0/2 Agradecimentos: Jorge Iwano, Rodrigo Gregório, Willian Nawate ## Author Hudson Teixeira groups: - name: Templates items: - uuid: 25f83bb4b3d74a4788f3fd4656224f5c name: 'Number of network interfaces' type: SNMP_AGENT snmp_oid: 'IF-MIB::ifNumber.0' key: ifNumber delay: '60' history: 7d description: 'The number of network interfaces (regardless of their current state) present on this system.' tags: - tag: Application value: Interfaces discovery_rules: - uuid: 9a2e4b8b9c014ac58d3ffcabf610af6d name: 'Network interfaces' type: SNMP_AGENT snmp_oid: 'discovery[{#SNMPVALUE},IF-MIB::ifName]' key: ifName delay: '30' description: | You may also consider using IF-MIB::ifType or IF-MIB::ifAlias for discovery depending on your filtering needs. {$SNMP_COMMUNITY} is a global macro. item_prototypes: - uuid: 31de5d84ae52481ebdfa8b79436d9075 name: 'Admin status of interface $1' type: SNMP_AGENT snmp_oid: 'IF-MIB::ifAdminStatus.{#SNMPINDEX}' key: 'ifAdminStatus[{#SNMPVALUE}]' delay: '60' history: 7d description: 'The desired state of the interface.' valuemap: name: 'SNMP interface status (ifAdminStatus)' tags: - tag: Application value: Interfaces - uuid: 9535a3367fb3489da204ba9faabc3fd1 name: 'Incoming traffic on interface $1' type: SNMP_AGENT snmp_oid: 'IF-MIB::ifInOctets.{#SNMPINDEX}' key: 'ifInOctets[{#SNMPVALUE}]' delay: '10' history: 7d units: bps description: 'The number of octets in valid MAC frames received on this interface, including the MAC header and FCS.' preprocessing: - type: CHANGE_PER_SECOND parameters: - '' - type: MULTIPLIER parameters: - '8' tags: - tag: Application value: Interfaces - uuid: 2bf4992949bc454f9da7ad97071c6239 name: 'Name of interface $1' type: SNMP_AGENT snmp_oid: 'IF-MIB::ifName.{#SNMPINDEX}' key: 'ifName[{#SNMPVALUE}]' delay: '3600' history: 7d trends: '0' value_type: CHAR tags: - tag: Application value: Interfaces - uuid: d5ab8a78b6fe4f7fadd1deca56cc2985 name: 'Operational status of interface $1' type: SNMP_AGENT snmp_oid: 'IF-MIB::ifOperStatus.{#SNMPINDEX}' key: 'ifOperStatus[{#SNMPVALUE}]' delay: '60' history: 7d description: 'The current operational state of the interface.' valuemap: name: 'SNMP interface status (ifOperStatus)' tags: - tag: Application value: Interfaces trigger_prototypes: - uuid: e3214b8185cf4b11971c0897836e7a93 expression: '(last(/SNMP Interfaces Huawei/ifOperStatus[{#SNMPVALUE}],#1)<>last(/SNMP Interfaces Huawei/ifOperStatus[{#SNMPVALUE}],#2))=1' name: 'Operational status was changed on {HOST.NAME} interface {#SNMPVALUE}' priority: INFO - uuid: c0e2bb32d05b4acda64b8fe25a49528c name: 'Outgoing traffic on interface $1' type: SNMP_AGENT snmp_oid: 'IF-MIB::ifOutOctets.{#SNMPINDEX}' key: 'ifOutOctets[{#SNMPVALUE}]' delay: '10' history: 7d units: bps description: 'The number of octets transmitted in MAC frames on this interface, including the MAC header and FCS.' preprocessing: - type: CHANGE_PER_SECOND parameters: - '' - type: MULTIPLIER parameters: - '8' tags: - tag: Application value: Interfaces graph_prototypes: - uuid: 2684e4ea80764b488867c2a36f96b75c name: 'Traffic on interface {#SNMPVALUE}' graph_items: - drawtype: GRADIENT_LINE color: 00AA00 item: host: 'SNMP Interfaces Huawei' key: 'ifInOctets[{#SNMPVALUE}]' - sortorder: '1' drawtype: GRADIENT_LINE color: 3333FF item: host: 'SNMP Interfaces Huawei' key: 'ifOutOctets[{#SNMPVALUE}]' macros: - macro: '{$SNMP_COMMUNITY}' value: public valuemaps: - uuid: 1dca501a48bd4169bed19e22f41dbc19 name: 'SNMP interface status (ifAdminStatus)' mappings: - value: '1' newvalue: up - value: '2' newvalue: down - value: '3' newvalue: testing - uuid: fd909016769f4ac9abadd7f8fc8f95b4 name: 'SNMP interface status (ifOperStatus)' mappings: - value: '1' newvalue: up - value: '2' newvalue: down - value: '3' newvalue: testing - value: '4' newvalue: unknown - value: '5' newvalue: dormant - value: '6' newvalue: notPresent - value: '7' newvalue: lowerLayerDown