mirror of
https://github.com/FreifunkFranken/fff-monitoring.git
synced 2024-06-15 20:04:03 +02:00
Previously, old stats had been only deleted if the router was online. This required a join with the router table, which caused locking issues when writing to this table by alfred request. Now, we just delete old stats ignoring the router state, except for the router_stats table, which is smaller and thus remains as before. In addition, this patch logs the number of rows affected. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> |
||
---|---|---|
alfred-monitoring-proxy | ||
contrib | ||
ffmap | ||
gwinfo | ||
scripts | ||
.gitignore | ||
install.sh | ||
README.md | ||
setup.py |
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