SC17 showfloor heatmap
Reads data from a Cisco Prime and turns it into a heatmap of clients associations. Needs manual input for AP locations. It also supports live bandwidth heatmaps, which update in realtime with sFlow-RT.
See the following youtube video: https://www.youtube.com/watch?v=yYeZzxcRPpk
-
Clone this repo
-
Create a config.ini (based on config.ini.EXAMPLE)
-
Get current ap_list.json from a Prime:
./queryprime.py > website/ap_list.json -
Get a floormap image (in SVG and PNG) and save it to
website/floormap.* -
Use
./imageviewer.pyto createwebsite/ap_loc.jsonfile- Load File... (
website/floorplan.png) - Load AP List.. (
website/ap_list.json) - See terminal for AP name and click on location (Zoom with CMD++ and CMD+-)
- Skip APs with CMD+n and go back to last AP with CMD+b
- Save AP Locations to
website/ap_loc.json
- Load File... (
-
Point browser to
website/index.html(e.g., with./runserver.pyinwebsite) -
Add
?show_apsto URL to also show AP placement on showfloor. -
Add the following cronjob to update website every minute and record history (for use with animation.html):
* * * * * cd /my/path/to/showfloor-heatmap/ && ./queryprime.py > website/ap_list.json && cp website/ap_list.json website/archive/`date +%Y-%m-%d_%H:%M:%S`.json
If you need to add any ap locations later. imagesviewer.py supports searching for individual ap names (Command-F), but the resulting file needs to be merged manually.
- Create an sFlow-RT app, as described here with the following script:
controller = "140.221.244.2"; // needs to be changed
setFlow('sc17-wifi',
{
keys: "if:ipsource:"+controller+":ipdestination:ipsource",
value:'bytes',
filter:"(ipsource="+controller+" & udpsourceport=5247) | (ipdestination="+controller+" & udpdestinationport=5247)",
t: 10
});- Update the sFlow-RT URL in the
index_traffic.htmlfile, to point to your app. - Open up
website/index_traffic.html, which will update every 200ms. - To change interval use
?interval=1000(for 1 second updates).
- Center map (currently it is aligned left)
- Julian Hammer
- Neil McKee (sFlow-RT integration)
GNU Affero General Public License Version 3.0