Git Product home page Git Product logo

meraki-netbox's Introduction

Meraki-Netbox

A set of python scripts and an AWS Lambda function that leverages a python module that can synchronize data between Netbox and the Meraki Dashboard.

Requirements

Python

Python requimrents are contained in requirements.txt:

pip install -r requirements.txt

Netbox

You Netbox deployment must be configred with the following tags and custom fields:

Tags:

  • discovered

Custom Fields:

  • last_used: date
  • mac: string

Environment Variable

  • NETBOX_URL: URL of the Netbox instance
  • NETBOX_TOKEN: Netbox API Token
  • MERAKI_ORG_ID: Meraki ORG Id
  • MERAKI_DASHBOARD_API_KEY: Meraki API TOKEN
  • MERAKI_TIMESPAN: Timespan for the IP Address search

Organization

This repo contains a module (meraki-netbox) along with scripts that leverage the functions in that module. It also contains an AWS Lambda function that can call different functionality from the module depending on the event that the Lambda fucntion receives.

Scripts

discover_meraki_clients.py

Description:

This script iterates through the specified organization's networks looking for networks with the discover-clients tag. When it finds such a network, it iterates through all of the hosts in that network. For each host, it either adds it to IP Addresses if it does not exist or updates it if it does exist. In both cases, it updates the last_used and mac fields. When it adds a host, it also adds a discovered tag to keep track of the hosts that were added through the discovery process.

Makefile targets

A number of default make targets are provided. You can run make help to get a short summary of each.

Useful targets:

  • make check: runs yapf and pylint to check formatting and code correctness. A .pylintrc is provided with some defaults to make it a little less picky.
  • make docs : build documentation in HTML and Markdown. By default, it will automatically generate API documentation for everyting in myproject. Output documents can be found in docs/build.
  • make clean: cleans up generated binaries, virtualenvs, and documentation
  • make lambda-layer: Creates a layer for the dependancied in requirements.txt and pushes to AWS Lambda
  • make lambda-deploy: Packages the function and pushed to AWS Lambda

Note: See Contributing for guideline to use when contributing to this project

meraki-netbox's People

Contributors

jlothian avatar stevenca avatar

Stargazers

 avatar

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.