CMX-auto-test
This ia a quick tool that can be used to verify POST data coming from Meraki's CMX.
Esentially this server can be used to verify POSTs are being sent out from a network, along with which API version is being sent.
The server is able to dynamically add and remove Push URLs via a web GUI, making life a little easier.
Table of contents
-CMX auto test
-Table of contents
-Install
-Setting up a Server
-How to use
-Examples
Install
To install you will need ruby. If you do not have ruby, please follow this link for installing ruby:
Installing Ruby on Linux
Gems needed:
- sinatra
- sinatra-redirect-with-flash
- sequel
- rack-flash3
- json
- rack-google-analytics
You can install all of these with the following command:
gem install sinatra sinatra-redirect-with-flash sequel rack-flash3 json rack-google-analytics
Setting up a Server
- Clone repository
- Copy the "sample-config.yml" file and rename it "config.yaml"
- Edit the "config.yaml" file
- Enter the hostname and port number you want to use for the push URLs
- Enter a secret, which will be used for validation
- Enter a Google Analytics tracker (not neccesary, but can be useful)
- Enter a http session token
- To start the server, run the following command, substituting the IP address and port number you want to use:
ruby autocmx.rb
How to use
- Open a browser and go to http://HOSTNAME:PORT_NUMBER/
- Fill in your name, case number and validator from the test network
- Click "Add test!"
- Add the push URL to the test network's dashboard
- Add the displayed push URL for you test to the test dashboard
- Select your API version (if applicable)
- Enter your secret
- Click the "Validate" button on dashboard
- Wait a few minutes
- Go back to http://HOSTNAME:PORT_NUMBER/
- Your test row should turn green when the server recieves POSTs from CMX
- It will display the received API version along, with a timestamp from the last POST it received
- When you are done
- Remove your push URL from dashboard (the server will continue to receive POSTs until you remove the push URL)
- Click the delete button on the test server to have the server stop listening
Examples