Giter Club home page Giter Club logo

meraki-notifier's Introduction

published

Meraki notifier to Webex Teams

This webhook listens to Meraki scanning notifications, and posts messages to a Webex Teams space as known devices are seen/leaving the Meraki SSID.

To run this code, you will need to:

  1. a Meraki Access Point
  2. create a scanning Webhook pointing to this code (exposed at a public URL / ngrok)
  3. create a Teams Space and a Bot token
  4. update the list of known Mac addresses in people.js
  5. launch the app with specified env variables (see below)

All set! please reach to your space and wait for notifications to fly in as devices connect

bot in action

Quick start on Glitch

Click Remix on Glitch

Then open the .env file and paste the Webex Teams info: bot's token and space id You app is now running (with default Meraki settings). Your app healthcheck is accessible at your webhook public url.

Open the Meraki dashboard, and create a scanning webhook pointing to your webhook URL on glitch. Tip: add /scanning to the glitch public URL

Now, update the Meraki entry in .env with your meraki SSID, secret and validator. And update the list of known Mac addresses in ./people.js

All set! Connect your device it for notifications to fly in as devices connect

Run locally

For Mac, Linux and bash users, open a terminal and type:

git clone https://github.com/ObjectIsAdvantag/meraki-notifier
cd meraki-notifier
npm install

DEBUG=meraquoi* TEAMS_SPACE=<your-space-id> TEAMS_TOKEN=<your-bot-token> MERAKI_SECRET=CiscoDevNet MERAKI_VALIDATOR=<from-meraki-dashboard> MERAKI_SSID=<your-SSID> node webhook.js
Meraki scanning webhook listening at: 8080
   GET  /          : for health checks
   POST /scanning  : to receive meraki scanning events node webhook.js
  
  meraquoi:purge cron checking every 1 minute(s), for not seen devices over 10 minute(s) +0ms
  meraquoi:purge time to purgeEntries, with 0 devices currently seen +44s
  meraquoi new scanning data received: Fri, 05 Apr 2019 08:36:13 GMT +0ms
  meraquoi processing payload with: 6 observations +3ms
  meraquoi device: 4c:66:41:15:9c:bc, from owner: Stève, detected on SSID:  Meraqui +1ms
  meraquoi updated last seen time to: 2019-04-05T08:35:04Z, for client: 4c:66:41:15:9c:bc +6ms

For Windows users, open a CMD shell and type:

git clone https://github.com/ObjectIsAdvantag/meraki-notifier
cd smartsheet-to-webex-teams
npm install
set DEBUG=meraquoi*
set TEAMS_SPACE=<your-space-id>
set TEAMS_TOKEN=<your-bot-token>
set MERAKI_SECRET=CiscoDevNet
set MERAKI_VALIDATOR=<from-meraki-dashboard>
set MERAKI_SSID=<your-SSID>
...
node webhook.js

Done, your webhook is live

Let's hit your app's healthcheck! From the command line, type:

curl -X GET http://localhost:8080

meraki-notifier's People

Contributors

objectisadvantag avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

carquefolie

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.