mirror of
https://github.com/FreifunkFranken/fff-monitoring.git
synced 2024-06-17 04:44:25 +02:00
Adrian Schmutzler
a57d459c77
With router_rate_limit_list, routers were not processed if the time difference between calls was less than 5 minutes for the same MAC address. While this is generally not bad, there are some drawbacks: - Not having been aware of this fact, we have established other mechanisms to dilute data density, which might have interfered - With KeyXchangeV2, two gateways will send data with less than 5 min. difference. As gateways are not connected, we know that we alternately receive newer and older data. With router_rate_limit_list, some of this data has been discarded before its "age" was evaluated. This caused an unwanted additional dilution of data which might have caused "offline" routers not being actually offline (for a short period) - With KeyXchangeV1, if the second call was a little earlier, the a big share of the data would not be "new enough" and just be discarded - With KeyXchangeV1, the same would happen for the order of records varying between alfred calls, were some records would have more and some less than 5 minutes time difference To get rid of these issues, we remove router_rate_limit_list and test whether the newer measures to dilute data are effective. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> |
||
---|---|---|
alfred-monitoring-proxy | ||
contrib | ||
ffmap | ||
gwinfo | ||
scripts | ||
.gitignore | ||
install.sh | ||
README.md | ||
restart.sh | ||
setup.py | ||
start.sh | ||
stop.sh |
Debian Dependencies
apt-get install mysql-server python3-mysqldb python python3 python3-requests python3-lxml python3-pip python3-flask python3-dateutil python3-numpy python3-scipy python3-mapnik python3-pip uwsgi-plugin-python3 nginx
pip3 install pymongo pillow modestmaps simplejson werkzeug
When updating
apt-get install mysql-server python3-mysqldb python3-mapnik
apt-get uninstall mongodb python-mapnik uwsgi-plugin-python tilestache
pip3 install pillow modestmaps simplejson werkzeug
pip3 uninstall uuid
Prerequisites
- Datenbank in MySQL anlegen
- Git vorbereiten:
git clone https://github.com/asdil12/fff-monitoring
git clone https://github.com/TileStache/TileStache
cd fff-monitoring
cp ffmap/mysqlconfig.example.py ffmap/mysqlconfig.py
- MySQL Zugangsdaten in mysqlconfig.py eintragen
Installation
./install.sh
systemctl daemon-reload
systemctl enable uwsgi-ffmap
systemctl enable uwsgi-tiles
systemctl start uwsgi-ffmap
systemctl start uwsgi-tiles
cd ffmap/db/
./init_db.py
# Then apply NGINX Config
NGINX Config
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
...
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:3031;
client_max_body_size 30M;
}
location /tiles {
include uwsgi_params;
uwsgi_pass 127.0.0.1:3032;
}
location /static/ {
root /usr/share/ffmap/;
expires max;
add_header Cache-Control "public";
}
...
}
Admin anlegen
- User über WebUI anlegen
- Dann über z.B. phpmyadmin in der Tabelle users 'admin' auf 1 setzen