Giter Site home page Giter Site logo

icinga-director_ciscomeraki-import's Introduction

Automated import for Cisco Meraki

fileshipper module required

This will call the Meraki Dashboard API and query all networks from the organisation for Meraki devices. Query results are writen into a json file for each network so the Icinga Director can import them.

The json file will store a lot of values. From the name over the serial number to the geolocation.

Meraki data fields

  • name
  • address
  • lanip
  • lat
  • lng
  • mac
  • model
  • networkid
  • serial

Data that i use in my import/sync rules

  • name
  • lat & lng = geolocation
  • model
  • serial
  • lanip

Returns the script any error, the script can send an email to the icinga admin with the error code.

The python script can be trigged with a cron job.

SQL Script to add ImportSource and Sync Rule

The SQL file will show how to add import sources and sync rules for the icinga director to import the devices from the json file with sql so when you have a lot of networks in the Meraki environment you don´t have to create this in the gui.

WARNING - THE SQL FILE IS WITHOUT WARRANTY - BE CARFUL WHEN YOU EDIT DATABASES

This is the host object that the import/sync rules from the sql file will create:

    1	object Host "*name*" { 
 	2	   import "network-host" 
 	3	 
 	4	   display_name = "*name*" 
 	5	   address = "*lanip*" 
 	6	   notes_url = "https://n213.meraki.com" 
 	7	   vars.geolocation = "*geolocation*" 
 	8	   vars.manufacturer = "Cisco Meraki" 
 	9	   vars.model = "*model*" 
 	10	   vars.serial = "*serial*" 
 	11	} 

Create geolocation

The import source from the sql file will generate the custom var "geolocation" from the import data lat and lng in the modification tab. The json file stores only the lat and lng data.

Implemented custom variables

This are the var´s that are implemented in the sync rule from the sql file.

  • geolocation
  • manufacturer
  • model
  • serial

icinga-director_ciscomeraki-import's People

Contributors

hashfunktion avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

stultitiophobia

icinga-director_ciscomeraki-import's Issues

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.