GithubHelp home page GithubHelp logo

prototype-x / zabbix-template-juniper-mx-bgp4-ipv4-ipv6 Goto Github PK

View Code? Open in Web Editor NEW
33.0 9.0 23.0 47 KB

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

License: GNU General Public License v3.0

Python 100.00%
juniper junos mx zabbix template bgp-peer template-juniper-mx discovery-bgp4-peers zabbix-templates

zabbix-template-juniper-mx-bgp4-ipv4-ipv6's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.