5.02021-11-21T21:58:39ZTemplates/ModulesModule Interfaces SNMPv3Module Interfaces SNMPv3## Description
Template Module Interfaces SNMPv3 Used template Template Module Interfaces SNMPv2 Ville Leinonen https://www.hacknetwork.org Version 1.0
## Overview
UPDATED: There was a bug in version 1.0
Linked for Template Net HP and Aruba Enterprise Switch SNMPv3, but works also individually.
SNMPv3 support added, new macros:
{$SECURITY\_NAME} = Username
{$AUTH\_PASSPHRASE} = Authentication password
{$PRIV\_PASSPHRASE} = Encryption password
Template is just like V2 templates, but changed to support SNMPv3, please use SHA and AES128.
Templates/ModulesNetwork interfacesNetwork interfaces discoverySNMP_AGENTdiscovery[{#IFOPERSTATUS},1.3.6.1.2.1.2.2.1.8,{#IFADMINSTATUS},1.3.6.1.2.1.2.2.1.7,{#IFALIAS},1.3.6.1.2.1.31.1.1.1.18,{#IFNAME},1.3.6.1.2.1.31.1.1.1.1,{#IFDESCR},1.3.6.1.2.1.2.2.1.2,{#IFTYPE},1.3.6.1.2.1.2.2.1.3]net.if.discoveryV31hAND{#IFADMINSTATUS}{$NET.IF.IFADMINSTATUS.MATCHES}A{#IFADMINSTATUS}{$NET.IF.IFADMINSTATUS.NOT_MATCHES}NOT_MATCHES_REGEXB{#IFOPERSTATUS}{$NET.IF.IFOPERSTATUS.MATCHES}I{#IFOPERSTATUS}{$NET.IF.IFOPERSTATUS.NOT_MATCHES}NOT_MATCHES_REGEXJ{#IFNAME}{$NET.IF.IFNAME.MATCHES}G{#IFNAME}{$NET.IF.IFNAME.NOT_MATCHES}NOT_MATCHES_REGEXH{#IFDESCR}{$NET.IF.IFDESCR.MATCHES}E{#IFDESCR}{$NET.IF.IFDESCR.NOT_MATCHES}NOT_MATCHES_REGEXF{#IFALIAS}{$NET.IF.IFALIAS.MATCHES}C{#IFALIAS}{$NET.IF.IFALIAS.NOT_MATCHES}NOT_MATCHES_REGEXD{#IFTYPE}{$NET.IF.IFTYPE.MATCHES}K{#IFTYPE}{$NET.IF.IFTYPE.NOT_MATCHES}NOT_MATCHES_REGEXLDiscovering interfaces from IF-MIB.Interface {#IFNAME}({#IFALIAS}): Inbound packets discardedSNMP_AGENT1.3.6.1.2.1.2.2.1.13.{#SNMPINDEX}net.if.in.discardsV3[ifInDiscards.{#SNMPINDEX}]3m7dMIB: IF-MIB
The number of inbound packets which were chosen to be discarded
even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.
One possible reason for discarding such a packet could be to free up buffer space.
Discontinuities in the value of this counter can occur at re-initialization of the management system,
and at other times as indicated by the value of ifCounterDiscontinuityTime.Interface {#IFNAME}({#IFALIAS})CHANGE_PER_SECONDInterface {#IFNAME}({#IFALIAS}): Inbound packets with errorsSNMP_AGENT1.3.6.1.2.1.2.2.1.14.{#SNMPINDEX}net.if.in.errorsV3[ifInErrors.{#SNMPINDEX}]3m7dMIB: IF-MIB
For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.Interface {#IFNAME}({#IFALIAS})CHANGE_PER_SECONDInterface {#IFNAME}({#IFALIAS}): Bits receivedSNMP_AGENT1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}net.if.inV3[ifHCInOctets.{#SNMPINDEX}]3m7dbpsMIB: IF-MIB
The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.Interface {#IFNAME}({#IFALIAS})CHANGE_PER_SECONDMULTIPLIER8Interface {#IFNAME}({#IFALIAS}): Outbound packets discardedSNMP_AGENT1.3.6.1.2.1.2.2.1.19.{#SNMPINDEX}net.if.out.discardsV3[ifOutDiscards.{#SNMPINDEX}]3m7dMIB: IF-MIB
The number of outbound packets which were chosen to be discarded
even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.
One possible reason for discarding such a packet could be to free up buffer space.
Discontinuities in the value of this counter can occur at re-initialization of the management system,
and at other times as indicated by the value of ifCounterDiscontinuityTime.Interface {#IFNAME}({#IFALIAS})CHANGE_PER_SECONDInterface {#IFNAME}({#IFALIAS}): Outbound packets with errorsSNMP_AGENT1.3.6.1.2.1.2.2.1.20.{#SNMPINDEX}net.if.out.errorsV3[ifOutErrors.{#SNMPINDEX}]3m7dMIB: IF-MIB
For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.Interface {#IFNAME}({#IFALIAS})CHANGE_PER_SECONDInterface {#IFNAME}({#IFALIAS}): Bits sentSNMP_AGENT1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}net.if.outV3[ifHCOutOctets.{#SNMPINDEX}]3m7dbpsMIB: IF-MIB
The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.Interface {#IFNAME}({#IFALIAS})CHANGE_PER_SECONDMULTIPLIER8Interface {#IFNAME}({#IFALIAS}): SpeedSNMP_AGENT1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}net.if.speedV3[ifHighSpeed.{#SNMPINDEX}]5m7d0bpsMIB: IF-MIB
An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of `n' then the speed of the interface is somewhere in the range of `n-500,000' to`n+499,999'. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. For a sub-layer which has no concept of bandwidth, this object should be zero.Interface {#IFNAME}({#IFALIAS})MULTIPLIER1000000DISCARD_UNCHANGED_HEARTBEAT1hInterface {#IFNAME}({#IFALIAS}): Operational statusSNMP_AGENT1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}net.if.statusV3[ifOperStatus.{#SNMPINDEX}]7d0MIB: IF-MIB
The current operational state of the interface.
- The testing(3) state indicates that no operational packet scan be passed
- If ifAdminStatus is down(2) then ifOperStatus should be down(2)
- If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic
- It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection)
- It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state
- It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components.Interface {#IFNAME}({#IFALIAS})IF-MIB::ifOperStatus{$IFCONTROL:"{#IFNAME}"}=1 and ({last()}=2 and {diff()}=1)RECOVERY_EXPRESSION{last()}<>2Interface {#IFNAME}({#IFALIAS}): Link downCurrent state: {ITEM.LASTVALUE1}AVERAGEThis trigger expression works as follows:
1. Can be triggered if operations status is down.
2. {$IFCONTROL:"{#IFNAME}"}=1 - user can redefine Context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
3. {TEMPLATE_NAME:METRIC.diff()}=1) - trigger fires only if operational status was up(1) sometime before. (So, do not fire 'ethernal off' interfaces.)
WARNING: if closed manually - won't fire again on next poll, because of .diff.Interface {#IFNAME}({#IFALIAS}): Interface typeSNMP_AGENT1.3.6.1.2.1.2.2.1.3.{#SNMPINDEX}net.if.type[ifTypeV3.{#SNMPINDEX}]1h7d0MIB: IF-MIB
The type of interface.
Additional values for ifType are assigned by the Internet Assigned NumbersAuthority (IANA),
through updating the syntax of the IANAifType textual convention.Interface {#IFNAME}({#IFALIAS})IF-MIB::ifTypeDISCARD_UNCHANGED_HEARTBEAT1d{Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].change()}<0 and {Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].last()}>0
and (
{Module Interfaces SNMPv3:net.if.type[ifTypeV3.{#SNMPINDEX}].last()}=6 or
{Module Interfaces SNMPv3:net.if.type[ifTypeV3.{#SNMPINDEX}].last()}=7 or
{Module Interfaces SNMPv3:net.if.type[ifTypeV3.{#SNMPINDEX}].last()}=11 or
{Module Interfaces SNMPv3:net.if.type[ifTypeV3.{#SNMPINDEX}].last()}=62 or
{Module Interfaces SNMPv3:net.if.type[ifTypeV3.{#SNMPINDEX}].last()}=69 or
{Module Interfaces SNMPv3:net.if.type[ifTypeV3.{#SNMPINDEX}].last()}=117
)
and
({Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}<>2)RECOVERY_EXPRESSION({Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].change()}>0 and {Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].prev()}>0) or
({Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}=2)Interface {#IFNAME}({#IFALIAS}): Ethernet has changed to lower speed than it was beforeCurrent reported speed: {ITEM.LASTVALUE1}INFOThis Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Ack to close.Interface {#IFNAME}({#IFALIAS}): Link down{$IFCONTROL:"{#IFNAME}"}=1 and ({Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}=2 and {Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].diff()}=1){Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}<>2({Module Interfaces SNMPv3:net.if.inV3[ifHCInOctets.{#SNMPINDEX}].avg(15m)}>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*{Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].last()} or
{Module Interfaces SNMPv3:net.if.outV3[ifHCOutOctets.{#SNMPINDEX}].avg(15m)}>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*{Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].last()}) and
{Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].last()}>0RECOVERY_EXPRESSION{Module Interfaces SNMPv3:net.if.inV3[ifHCInOctets.{#SNMPINDEX}].avg(15m)}<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*{Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].last()} and
{Module Interfaces SNMPv3:net.if.outV3[ifHCOutOctets.{#SNMPINDEX}].avg(15m)}<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*{Module Interfaces SNMPv3:net.if.speedV3[ifHighSpeed.{#SNMPINDEX}].last()}Interface {#IFNAME}({#IFALIAS}): High bandwidth usage ( > {$IF.UTIL.MAX:"{#IFNAME}"}% )In: {ITEM.LASTVALUE1}, out: {ITEM.LASTVALUE3}, speed: {ITEM.LASTVALUE2}WARNINGThe network interface utilization is close to its estimated maximum bandwidth.Interface {#IFNAME}({#IFALIAS}): Link down{$IFCONTROL:"{#IFNAME}"}=1 and ({Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}=2 and {Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].diff()}=1){Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}<>2{Module Interfaces SNMPv3:net.if.in.errorsV3[ifInErrors.{#SNMPINDEX}].min(5m)}>{$IF.ERRORS.WARN:"{#IFNAME}"}
or {Module Interfaces SNMPv3:net.if.out.errorsV3[ifOutErrors.{#SNMPINDEX}].min(5m)}>{$IF.ERRORS.WARN:"{#IFNAME}"}RECOVERY_EXPRESSION{Module Interfaces SNMPv3:net.if.in.errorsV3[ifInErrors.{#SNMPINDEX}].max(5m)}<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8
and {Module Interfaces SNMPv3:net.if.out.errorsV3[ifOutErrors.{#SNMPINDEX}].max(5m)}<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8Interface {#IFNAME}({#IFALIAS}): High error rate ( > {$IF.ERRORS.WARN:"{#IFNAME}"} for 5m)errors in: {ITEM.LASTVALUE1}, errors out: {ITEM.LASTVALUE2}WARNINGRecovers when below 80% of {$IF.ERRORS.WARN:"{#IFNAME}"} thresholdInterface {#IFNAME}({#IFALIAS}): Link down{$IFCONTROL:"{#IFNAME}"}=1 and ({Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}=2 and {Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].diff()}=1){Module Interfaces SNMPv3:net.if.statusV3[ifOperStatus.{#SNMPINDEX}].last()}<>2Interface {#IFNAME}({#IFALIAS}): Network trafficGRADIENT_LINE1A7C11- Module Interfaces SNMPv3net.if.inV3[ifHCInOctets.{#SNMPINDEX}]
1BOLD_LINE2774A4- Module Interfaces SNMPv3net.if.outV3[ifHCOutOctets.{#SNMPINDEX}]
2F63100RIGHT- Module Interfaces SNMPv3net.if.out.errorsV3[ifOutErrors.{#SNMPINDEX}]
3A54F10RIGHT- Module Interfaces SNMPv3net.if.in.errorsV3[ifInErrors.{#SNMPINDEX}]
4FC6EA3RIGHT- Module Interfaces SNMPv3net.if.out.discardsV3[ifOutDiscards.{#SNMPINDEX}]
56C59DCRIGHT- Module Interfaces SNMPv3net.if.in.discardsV3[ifInDiscards.{#SNMPINDEX}]
{$IF.ERRORS.WARN}2{$IF.UTIL.MAX}90{$IFCONTROL}1{$NET.IF.IFADMINSTATUS.MATCHES}^.*Ignore notPresent(6){$NET.IF.IFADMINSTATUS.NOT_MATCHES}^2$Ignore down(2) administrative status{$NET.IF.IFALIAS.MATCHES}.*{$NET.IF.IFALIAS.NOT_MATCHES}CHANGE_IF_NEEDED{$NET.IF.IFDESCR.MATCHES}.*{$NET.IF.IFDESCR.NOT_MATCHES}CHANGE_IF_NEEDED{$NET.IF.IFNAME.MATCHES}^.*${$NET.IF.IFNAME.NOT_MATCHES}(^Software Loopback Interface|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9a-z]+$|docker[0-9]+|br-[a-z0-9]{12})Filter out loopbacks, nulls, docker veth links and docker0 bridge by default{$NET.IF.IFOPERSTATUS.MATCHES}^.*${$NET.IF.IFOPERSTATUS.NOT_MATCHES}^6$Ignore notPresent(6){$NET.IF.IFTYPE.MATCHES}.*{$NET.IF.IFTYPE.NOT_MATCHES}CHANGE_IF_NEEDEDNetwork interfaces1120Interface {#IFNAME}({#IFALIAS}): Network trafficModule Interfaces SNMPv375010000112500003IF-MIB::ifOperStatus1up2down4unknown5dormant6notPresent7lowerLayerDownIF-MIB::ifType1other2regular18223hdh18224ddnX255rfc877x256ethernetCsmacd7iso88023Csmacd8iso88024TokenBus9iso88025TokenRing10iso88026Man11starLan12proteon10Mbit13proteon80Mbit14hyperchannel15fddi16lapb17sdlc18ds119e120basicISDN21primaryISDN22propPointToPointSerial23ppp24softwareLoopback25eon26ethernet3Mbit27nsip28slip29ultra30ds331sip32frameRelay33rs23234para35arcnet36arcnetPlus37atm38miox2539sonet40x25ple41iso88022llc42localTalk43smdsDxi44frameRelayService45v3546hssi47hippi48modem49aal550sonetPath51sonetVT52smdsIcip53propVirtual54propMultiplexor55ieee8021256fibreChannel57hippiInterface58frameRelayInterconnect59aflane802360aflane802561cctEmul62fastEther63isdn64v1165v3666g703at64k67g703at2mb68qllc69fastEtherFX70channel71ieee8021172ibm370parChan73escon74dlsw75isdns76isdnu77lapd78ipSwitch79rsrb80atmLogical81ds082ds0Bundle83bsc84async85cnr86iso88025Dtr87eplrs88arap89propCnls90hostPad91termPad92frameRelayMPI93x21394adsl95radsl96sdsl97vdsl98iso88025CRFPInt99myrinet100voiceEM101voiceFXO102voiceFXS103voiceEncap104voiceOverIp105atmDxi106atmFuni107atmIma108pppMultilinkBundle109ipOverCdlc110ipOverClaw111stackToStack112virtualIpAddress113mpc114ipOverAtm115iso88025Fiber116tdlc117gigabitEthernet118hdlc119lapf120v37121x25mlp122x25huntGroup123trasnpHdlc124interleave125fast126ip127docsCableMaclayer128docsCableDownstream129docsCableUpstream130a12MppSwitch131tunnel132coffee133ces134atmSubInterface135l2vlan136l3ipvlan137l3ipxvlan138digitalPowerline139mediaMailOverIp140dtm141dcn142ipForward143msdsl144ieee1394145if-gsn146dvbRccMacLayer147dvbRccDownstream148dvbRccUpstream149atmVirtual150mplsTunnel151srp152voiceOverAtm153voiceOverFrameRelay154idsl155compositeLink156ss7SigLink157propWirelessP2P158frForward159rfc1483160usb161ieee8023adLag162bgppolicyaccounting163frf16MfrBundle164h323Gatekeeper165h323Proxy166mpls167mfSigLink168hdsl2169shdsl170ds1FDL171pos172dvbAsiIn173dvbAsiOut174plc175nfas176tr008177gr303RDT178gr303IDT179isup180propDocsWirelessMaclayer181propDocsWirelessDownstream182propDocsWirelessUpstream183hiperlan2184propBWAp2Mp185sonetOverheadChannel186digitalWrapperOverheadChannel187aal2188radioMAC189atmRadio190imt191mvl192reachDSL193frDlciEndPt194atmVciEndPt195opticalChannel196opticalTransport197propAtm198voiceOverCable199infiniband200teLink201q2931202virtualTg203sipTg204sipSig205docsCableUpstreamChannel206econet207pon155208pon622209bridge210linegroup211voiceEMFGD212voiceFGDEANA213voiceDID214mpegTransport215sixToFour216gtp217pdnEtherLoop1218pdnEtherLoop2219opticalChannelGroup220homepna221gfp222ciscoISLvlan223actelisMetaLOOP224fcipLink225rpr226qam227lmp228cblVectaStar229docsCableMCmtsDownstream230adsl2231macSecControlledIF232macSecUncontrolledIF233aviciOpticalEther234atmbond235voiceFGDOS236mocaVersion1237ieee80216WMAN238adsl2plus239dvbRcsMacLayer240dvbTdm241dvbRcsTdma242x86Laps243wwanPP244wwanPP2245voiceEBS246ifPwType247ilan248pip249aluELP250gpon251vdsl2252capwapDot11Profile253capwapDot11Bss254capwapWtpVirtualRadio255bits256docsCableUpstreamRfPort257cableDownstreamRfPort258vmwareVirtualNic259ieee802154260otnOdu261otnOtu262ifVfiType263g9981264g9982265g9983266aluEpon267aluEponOnu268aluEponPhysicalUni269aluEponLogicalLink270aluGponOnu271aluGponPhysicalUni272vmwareNicTeam277docsOfdmDownstream278docsOfdmaUpstream279gfast280sdci281xboxWireless282fastdsl283docsCableScte55d1FwdOob284docsCableScte55d1RetOob285docsCableScte55d2DsOob286docsCableScte55d2UsOob287docsCableNdf288docsCableNdr289ptm290ghn