- Accept a GET request from Meraki and respond with a validator
- Meraki will POST to server, if validated.
- POST will contain a secret, which can be verified by the server.
- JSON data will be in the req.body.data. This will be available in the cmxData function's data object. *note: CMX is now called Scanning API in Meraki documentation
-- The basic app will only place the data received on the console.
-- Extends the basic app by placing data into a local MongoDB database.
-
Flask must be installed http://flask.pocoo.org/docs/0.12/
-
Cisco Meraki Network with CMX/Scanning API enabled and configured to point to this server
$ git clone <<this repo>>
- Option 1 - Basic Receiver
python3 cmxreceiver.py -v <validator> -s <secret>'
- Option 2 - Receiver with MongoDB
python3 cmxreceiver-mongodb.py -v <validator> -s <secret>'
- Option 1 - Basic Receiver
export FLASK_APP=cmxreceiver.py -v yourValidatorKey -s yourSecret
flask run -h 0.0.0.0
* Running on http://0.0.0.0:5000/
- Option 2 - Receiver with MongoDB
export FLASK_APP=cmxreceiver-mongodb.py -v yourValidatorKey -s yourSecret
flask run -h 0.0.0.0
* Running on http://0.0.0.0:5000/
- Port: 5000
- CMX Post URL: http://yourserver:5000/
- use ngrok to expose port 5000
ngrok http 5000
Then use the new url it creates as your base URL. https://2a6eed03.ngrok.io/
https://documentation.meraki.com/MR/Monitoring_and_Reporting/CMX_Analytics#CMX_Location_API
2016