Coder Social home page Coder Social logo

redborder / rb-arubacentral Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 8.83 MB

Service to get location API information from Aruba Central

License: GNU Affero General Public License v3.0

Ruby 97.42% Makefile 2.58%
aruba arubanetworks kafka redborder ruby autodelivery

rb-arubacentral's Introduction

rb-arubacentral

tests rubocop License: AGPL v3 codecov FOSSA Status

Aruba Central is a cloud-based network management platform, similar to ALE (Aruba Location Engine) and Cisco MSE (Mobility Services Engine). It is developed by Aruba Networks, a Hewlett Packard Enterprise company. Aruba Central provides centralized management and monitoring of Aruba network devices, such as switches, routers, and wireless access points.

The goal of the Aruba Central service is to fetch data from Aruba Central APs and transform it into real-time actionable information to track the mobility of people connected to Aruba Central APs.

1. Workflow

The rb-arubacentral service processes data from the Aruba Central REST API. After retrieving the data, it generates two types of objects: the AP status and the mobility data. It then generates Kafka events and sends them to the Kafka broker in batches with the location data and the APs status data.

2. Caching

The rb-arubacentral can cache data for common requests. This is done to reduce API calls to the Aruba Central REST. The service first checks if the request is in the cache list. If it's not, then it will call the Aruba Central service as usual. If it's in the list, it will retrieve the data from the cache. Subsequently, it will read from the cache until it expires and then refresh its cache again by calling the REST.

3. Config

3.1 Sensors

  • sensor_name (string): Name of the aruba central sensor
  • gateway (string): Where the gather the information
  • email (string): Aruba Central Email
  • password (string): Aruba Central Password
  • client_id (string): Aruba Central Client ID
  • client_secret (string): Aruba Central Client Secret
  • customer_id (string): Aruba Central Customer ID

3.2 Kafka

  • broker (string): Kafka Broker
  • producer_name (string): Kafka Producer Name
  • location_topic (string): Kafka Location Topic
  • status_topic (string): Kafka Status Topic

3.3 Service

  • sleep_time (integer): Sleep time of service in seconds (for the main loop)
  • log_level (integer): Log Level (2=info) (3=debug)

3.4 Flow Sensors

  • sensor_name (string): Name of the sensor
  • sensor_uuid (string): UUID v4 of the sensor
  • access_points (array): Access points of the flow sensor

3.5 Cache

  • ttl (hash): Cache ttl based on function method when requesting to aruba central
  • keys (array): List of functions to catch result for

3.6 Example

sensors:
  -
       sensor_name: Aruba Central
       gateway: 'https://apigw-eucentral3.central.arubanetworks.com'
       email: '[email protected]'
       password: 'admin'
       client_id: 'admin'
       client_secret: 'admin'
       customer_id: 'admin'
kafka:
  broker: 'kafka.redborder.cluster:9092'
  producer_name: my_aruba_producer
  location_topic: rb_loc
  status_topic: rb_status
service:
  sleep_time: 300
  log_level: 2
flow_sensors:
  -
       sensor_name: MySensorName
       sensor_uuid: 2e7241e4-12cf-4c6b-926c-5524ad537179
       access_points: ["00:00:00:00:00:01", "00:00:00:00:00:02", "00:00:00:00:00:03"]
cache:
  ttl:
    fetch_all_campuses: 3600
    fetch_campus: 1800
    fetch_floor_location: 7200
    fetch_building: 14400
  keys: [fetch_all_campuses fetch_campus fetch_floor_location fetch_building]

4. How to install?

The rb-arubacentral has been tested on ruby 2.1.2 and ruby 2.1.9, you can install and run the program executing the following instructions

cd rb-arubacentral
rvm install 2.1.2
bundle install

4.1 Running

For running the service you can pass custom config file using -c, for example ruby ./bin/rb_arubacentral.rb -c /path/to/my/config.yml or you can just run ruby ./bin/rb_arubacentral.rb and it will take the default config file.

5. Contribute

  • Create a fork of the project
  • Create a branch bugfix_myfix, feature_myfeature, improvement_myimprovement
  • Create the test
  • Run the tests ensuring all pass using rake test
  • Open a PR to the master branch

5. License

FOSSA Status

6. Authors

rb-arubacentral's People

Contributors

davidredborder avatar fossabot avatar malvads avatar manegron avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

fossabot malvads

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.