====== Webserver-Konfiguration ======
===== Dienste =====
^Name ^Zweck ^ffmd-repo ^Ort ^inst. Version ^autostart ^sonstiges ^
|[[https://github.com/tcatm/alfred|alfred]] |mesh-metadaten |[[http://github.com/freifunkmd/alfred|alfred]] | |2014.2.0 | | |
|[[https://github.com/plumpudding/hopglass-server/tree/modules|hopglass-server]] |hopglass-server |[[https://github.com/plumpudding/hopglass|hopglass-server]] |/opt/hopglass-server |module branch |/etc/hopglass-server/default/config.json | |
|[[https://github.com/plumpudding/hopglass|hopglass]] |hopglass |[[http://github.com/freifunkmd/alfred|hopglass]] |/opt/hopglass | | | |
|[[https://github.com/freifunkhamburg/ffmap-backend|ffmap-backend]] |backend zu Map |[[https://github.com/FreifunkMD/ffmap-backend|ffmap-backend]] |/usr/local/lib/ffmap |
|[[https://grafana.com|grafana]] |visualisierung statistik | | |6.2.1 | | |
|[[https://prometheus.io|Prometheus]] |Grafana-Stats Backend |[[offen]] | |2.9.2 / 2019-04-24 |autostart über Docker Policy | |
|[[https://github.com/ffnord/meshviewer|meshviewer]] |map |[[https://github.com/FreifunkMD/ffmap-d3|meshivewer]] |/var/www/map/ | | |anpassen der neuen Version (grüner/blauer Punkt) \\ /var/www/map/config.json Variable: current-firmware - not used |
|[[https://github.com/FreifunkMD/ffmd-wiki|wiki]] |dokumentation |? | |
|[[http://wordpress.org|wordpress]]
===== weitere Dinge =====
==== API ====
* alt: community.json -> /usr/local/lib/ffmap/community.json/api.json
* neu: community.json -> von https://github.com/FreifunkMD/community.json/blob/master/ffmd.json
==== fastd ====
* Änderung der startmethode von /etc/init.d/ zu systemdservice (systemctl start fastd@magdeburg)
==== grafana: ====
* service grafana-server start/stop/reboot ([[http://docs.grafana.org/installation/debian/|see documentation]])
* config: /etc/grafana/grafana.ini
[server]
root_url = https://map.md.freifunk.net/stats/
[analytics]
check_for_updates = true
[auth.anonymous]
enabled = true
* systemctl start grafana-server
* /usr/lib/systemd/system/grafana-server.service:
[Unit]
Description=Starts and stops a single grafana instance on this system
Documentation=http://docs.grafana.org
Wants=network-online.target
After=network-online.target
[Service]
EnvironmentFile=/etc/default/grafana-server
User=grafana
Group=grafana
Type=simple
Restart=on-failure
WorkingDirectory=/usr/share/grafana
ExecStart=/usr/sbin/grafana-server \
--config=${CONF_FILE} \
--pidfile=${PID_FILE} \
cfg:default.paths.logs=${LOG_DIR} \
cfg:default.paths.data=${DATA_DIR} \
cfg:default.paths.plugins=${PLUGINS_DIR}
LimitNOFILE=10000
TimeoutStopSec=20
UMask=0027
[Install]
WantedBy=multi-user.target
* frontend: https://map.md.freifunk.net/stats/dashboard
* graphana holt sich die Daten vom gw2, auf dem prometheus die daten in eine DB speichert (http://130.185.109.142:9090/graph)
==== hopglass ====
* config: /opt/hopglass/web/build/config.json
{
"dataPath": "data/",
"siteName": "Freifunk Magdeburg",
"mapSigmaScale": 0.5,
"showContact": false,
"maxAge": 14,
"mapLayers": [
{ "name": "OSM Standard",
"url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
"config": {
"type": "osm",
"attribution": "Karte hergestellt aus OpenStreetMap-Daten | Open Database License (ODbL)",
"maxZoom": 19
}
},
{ "name": "OSM deutscher Stil",
"url": "http://a.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",
"config": {
"type": "osm",
"attribution": "Karte hergestellt aus OpenStreetMap-Daten | Open Database License (ODbL)",
"maxZoom": 18
}
},
{ "name": "MapQuest",
"url": "https://otile{s}-s.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg",
"config": {
"subdomains": "1234",
"type": "osm",
"attribution": "Tiles © MapQuest, Data CC-BY-SA OpenStreetMap",
"maxZoom": 17
}
},
{
"name": "Stamen.TonerLite"
}
],
"siteNames": [
{ "site": "ffmd", "name": "Magdeburg" }
]
}
* update: cd /opt/hopglass/web/ ; git pull; npm install; grunt
==== hopglass-server ====
https://libraries.io/github/hopglass/hopglass-server
* config: /etc/hopglass-server/default/
* aliases.json:
{
"d2f429996861": {
"firstseen": "2016-04-07T17:49:18.252Z",
"nodeinfo": {
"node_id": "d2f429996861",
"owner": {
"contact": "kontakt@md.freifunk.net"
},
"network": {
"mac": "d2:f4:29:99:68:61",
"mesh_interfaces": [
"d2:f4:29:99:68:61"
],
"mesh": {
"bat0": {
"interfaces": {
"tunnel": [
"d2:f4:29:99:68:61"
]
}
}
}
},
"hostname": "gw1"
},
"neighbours": {
"batadv": {
"d2:f4:29:99:68:61": {}
}
}
}
"be981f07ffa3": {
"firstseen": "2016-04-07T17:49:18.252Z",
"nodeinfo": {
"node_id": "be981f07ffa3",
"owner": {
"contact": "kontakt@md.freifunk.net"
},
"network": {
"mac": "be:98:1f:07:ff:a3",
"mesh_interfaces": [
"be:98:1f:07:ff:a3"
],
"mesh": {
"bat0": {
"interfaces": {
"tunnel": [
"be:98:1f:07:ff:a3"
]
}
}
}
},
"hostname": "gw2"
},
"neighbours": {
"batadv": {
"be:98:1f:07:ff:a3": {}
}
}
}
}
* config.json:
{
"receiver": {
"receivers": [
{ "module": "announced",
"config": {
"interval": {
"statistics": 60,
"nodeinfo": 500
}
}
},
{ "module": "aliases",
"config": {
"file": "./aliases.json"
},
"overlay": true
}
],
"ifaces": [
"bat0"
],
"storage": {
"file": "./raw.json"
},
"purge": {
"maxAge": 14,
}
},
"provider": {
"offlineTime": 900
},
"webserver": {
"port": 4000
}
}
* systemctl start/stop hopglass-server@default
* /usr/lib/systemd/system/hopglass-server@.service
[Unit]
Description=The HopGlass Server collects data from the Freifunk network (%I)
[Service]
Type=simple
User=hopglass
Group=hopglass
WorkingDirectory=/etc/hopglass-server/%I/
ExecStart=/usr/bin/node --harmony /opt/hopglass/server/hopglass-server.js
Restart=always
[Install]
WantedBy=multi-user.target
* Daten werden gespeichert unter /etc/hopglass-server/default/raw.json
^Query Location ^Description ^
|http://web1.md.freifunk.net:4000/nodes.json |HopGlass nodes.json v2 |
|http://web1.md.freifunk.net:4000/graph.json |HopGlass graph.json v1 |
|http://web1.md.freifunk.net:4000/mv/nodes.json |Meshviewer nodes.json v2 |
|http://web1.md.freifunk.net:4000/mv/graph.json |Meshviewer graph.json v1 |
|http://web1.md.freifunk.net:4000/raw.json |Raw data collected, same as the ''%%raw.json%%'' save file|
|http://web1.md.freifunk.net:4000/hosts |hosts file to be placed in /etc/hosts |
|http://web1.md.freifunk.net:4000/metrics |Prometheus metrics |
|http://web1.md.freifunk.net:4000/wifi-aliases.txt |Aliases file for Wifi Analyzer app |
|http://web1.md.freifunk.net:4000/WifiAnalyzer_Alias.txt|Aliases file for Wifi Analyzer app |
|http://web1.md.freifunk.net:4000/ffapi.json |Freifunk API file |
|http://web1.md.freifunk.net:4000/nodes.zone |Named DNS zone file |