Skip to content

Zabbix Template for Juniper MX discovery BGP4 peers ipv4 and ipv6, RE, interfaces

License

Notifications You must be signed in to change notification settings

Prototype-X/Zabbix-Template-Juniper-MX-BGP4-ipv4-ipv6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zabbix-Template-Juniper-MX-BGP4-ipv4-ipv6

For BGP peers use the BGP4-V2-MIB-JUNIPER(mib-jnx-bgpmib2.txt), unfortunately ipv4 and ipv6 adresses return as hex numbers. Example ipv4 like: C0 A8 01 01, ipv6 like: 20 01 0D B8 11 A3 09 D7 1F 34 8A 2E 07 A0 76 5D. To fix this use script LLD.py for discovery BGP4 peers.

Used template for BGP: ZBX-CISCO-BGP4

Items BGP

  • Discovery: Administrative status of a peer
  • Discovery: Operational status of a peer
  • Discovery: Established time for a peer
  • Discovery: Remote AS for a peer
  • Discovery: All receiving prefixes for peer
  • Discovery: Accepted receiving prefixes for peer
  • Discovery: Rejected receiving prefixes for peer
  • Discovery: All advertising prefixes for peer
  • Discovery: Last recieved error for peer
  • Discovery: Last sent error for peer

Items RE

  • Discovery: CPU Usage
  • Discovery: 5 min load avarage
  • Discovery: Memory Usage
  • Discovery: Routing Engine temp

Items interfaces

  • Discovery: ifAdminStatus
  • Discovery: ifAlias
  • Discovery: ifHCInOctets
  • Discovery: ifHCOutOctets
  • Discovery: ifInDiscards
  • Discovery: ifInErrors
  • Discovery: ifName
  • Discovery: ifOperStatus
  • Discovery: ifOutDiscards
  • Discovery: ifOutErrors

Items

  • jnxRedAlarmState
  • jnxYellowAlarmState
  • Ping check
  • Uptime

Triggers for BGP, interfaces, RE

  • Loss ping
  • Router restarted
  • Alarm
  • Memory low
  • CPU high usage
  • Temp high
  • Interface down
  • Lost BGP prefixes
  • No BGP prefixes
  • BGP peer down

Graphs

  • BGP prefixes advertise/recieve
  • interfaces load and errors
  • RE load: CPU, Memory, Temp

Screen

  • one

Installation

Without script, IP shown as hex numbers, only Zabbix 3.X.X

  1. Import Template.Juniper.MX.xml file into Zabbix.

  2. Go to: Template Juniper MX - > Discovery rules -> JunOS BGP4

  3. Set type: SNMPv2 agent

  4. Set key: discovery-JunOS-BGP

  5. Set SNMP OID:

     discovery[{#PEERADDR}, .1.3.6.1.4.1.2636.5.1.1.2.1.1.1.11, {#PREFXTBL}, .1.3.6.1.4.1.2636.5.1.1.2.1.1.1.14, {#ADDRTYPE}, .1.3.6.1.4.1.2636.5.1.1.2.1.1.1.10, {#ASNUM}, .1.3.6.1.4.1.2636.5.1.1.2.1.1.1.13]
    
  6. Associate Template Juniper MX to the host.

  7. Add to your host the {$SNMP_COMMUNITY} macro with your SNMP community as value.

  8. Add to your host the {$BGP_PEER_AS} macro with your list BGP peer remote AS as value (ex: ASN1|ASN2|ASN3). These ASs have a high severity triggers.

  9. Go to: Template Juniper MX -> Discovery rules -> JunOS Interfaces -> Filters

  10. Check filter, edit or delete.

With script, IP shown as normal, Zabbix 2.X.X and above

  1. Import Template.Juniper.MX.xml file into Zabbix.(For Zabbix 2.X.X import valuemaps.xml first)

  2. Copy script LLD.py to /usr/lib/zabbix/externalscripts

  3. chmod +x LLD.py

  4. Go to: Template Juniper MX - > Discovery rules -> JunOS BGP4

  5. Set type: external check

  6. Set key:

     LLD.py["-h", {HOST.CONN}, "-c", "{$SNMP_COMMUNITY}", "-mi", "{#PEERADDR}", "-m", "{#PREFXTBL}", "{#ADDRTYPE}", "{#ASNUM}"]
    
  7. Associate Template Juniper MX to the host.

  8. Add to your host the {$SNMP_COMMUNITY} macro with your SNMP community as value.

  9. Add to your host the {$BGP_PEER_AS} macro with your list BGP peer remote AS as value (ex: ASN1|ASN2|ASN3). These ASs have a high severity triggers.

  10. Go to filter rules for interfaces: Template Juniper MX -> Discovery rules -> JunOS Interfaces -> Filters

  11. Check filter, edit or delete.

Script snmp v3 example:

    LLD.py["-h", {HOST.CONN}, "-v3", "-u{$SNMP_USER}", "-l{$SNMP_LEVEL}", "-aSHA", "-A{$SNMP_AUTH}", "-xAES", "-X{$SNMP_PRIV}", "-mi", "{#PEERADDR}", "-m", "{#PREFXTBL}", "{#ADDRTYPE}", "{#ASNUM}"]

SNMP Version 3 options:

-a PROTOCOL		set authentication protocol (MD5|SHA)
-A PASSPHRASE		set authentication protocol pass phrase
-l LEVEL		set security level (noAuthNoPriv|authNoPriv|authPriv)
-n CONTEXT		set context name (e.g. bridge1)
-u USER-NAME		set security name (e.g. bert)
-x PROTOCOL		set privacy protocol (DES|AES)
-X PASSPHRASE		set privacy protocol pass phrase

Requirements

For script LLD.py: python 3, snmpwalk, snmpbulkwalk.

Info

Template exported from Zabbix 3.X.X. For Zabbix 2.X.X correct discovery rules.

Gitter

Releases

No releases published

Packages

No packages published

Languages