Giter VIP home page Giter VIP logo

fff-monitoring's Introduction

Git Repository Logic

  • Frequent updates are made to the testing branch, which is considered "dirty". Commits appearing here may be quickly written, untested, incomplete, etc. This is where the development happens.
  • In unspecified intervals, the piled-up changes in the testing branch are reviewed, ordered and squashed to a smaller set of tidy commits. Those are then pushed to the master branch.
  • The tidy-up is marked by an empty commit "Realign with master" in the testing branch. This is roughly equivalent to a merge, although for an actual merge the commits would remain unaltered.
  • Development happens in the testing branch. Thus, testing is more up-to-date, but master is better to understand.
  • The Monitoring web server uses the testing branch.

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 wheel 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 wheel 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
cd ../.. # go back to fff-monitoring root directory
./scripts/setupcron.sh

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

fff-monitoring's People

Contributors

adschm avatar asdil12 avatar christiandresel avatar kratz00 avatar loki-kun avatar moexe avatar poempelfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fff-monitoring's Issues

Show number of clients in router overview.

At the button of the page /routers is a String XX Routers found.
It would be nice if this string could also show the sum of the clients of the shwon routers:
XX Routers with YY clients found.

This is especially interesting if the routers are filtered to show only the routers of a selected user.

Daten von Monitoring per API anstatt alfred

was cool wäre, eine Art datenbanksync so daß ich theoretisch auch ein Monitoring aufsetzen kann und einfach die Daten von anderen beziehen kann und somit auch alle dez. Hoods habe, keine Ahnung was z.b. MySQL da schickes bietet

man könnte per api immer den aktellen datensatz (also das was pro 5 min ankommt) als json anbieten und den dann woanders entsprechend mit nem cron abrufen und parsen

Mail Notification for offline routers

The "old" netman had the possibility to inform owners if the router goes down. This should be in monitoring a well - inkl. importing of the old settings. Else we'll have lots more zombies in near future.

Switch chart scaling between Byte/s and Bit/s

Feature-Request:
It would be nice if it would be possible to switch the chart-scale from Byte to Bit per second.

Maybe I can help implementing this, I have some experience with flot.

Orphaned Router-Delay wieder vergrößern

Ich bin dafür, das Delay wieder auf 60 oder 90 Tage zu setzen, denn:

  • Der Einfluss auf die Performance sollte im Gegensatz zur allg. Statistik (für JEDEN Router) gering sein
  • Die Performance sollte generell wieder besser sein, da ich wohl maßgeblich die Performance-Probleme verursacht habe
  • Es ist unheimlich hilfreich, wenn du so einen alten router wiederbelebst und dann stehen die daten noch irgendwo. Hab kürzlich einen Ersatzrouter vorbereitet und musste dann die Koordinaten raten, weil ich nicht nachschauen konnte, wo der alte steht. Genau dafür sind in meinen Augen die Daten eines offline Routers aber da. (Zum Gluck haben wir eine Datei wo Namen und Macs drin stehen)
  • Auch die diagnose eines kaputten routers macht ja nicht jeder innerhalb von 8 Tagen

Beste Grüße

Adrian

Blaue Linien für L3 Verbindungen

Hallo

da nun immer mehr Router per Layer 3 Richtfunk miteinander verbunden sind, bräuchten wir dafür auch schöne Linien und eine Nachbarn Anzeige.
Ich hab mal grundsätzlich angefangen eine XML mitzuschicken, das sollte aktuell dieser Router tun:

https://monitoring.freifunk-franken.de/routers/579daef89369c31f138d6c61

Er schickt in der XML folgendes mit:

<babel_neighbour><neighbour_0>fe80::6666:b3ff:fede:f5cdfe80::6666:b3ff:fede:f5cd<outgoing_interface>eth0.4</outgoing_interface></neighbour_0><neighbour_1>fe80::c11:12:15:da5fe80::c11:12:15:da5<outgoing_interface>fffgwcd1VPN</outgoing_interface></neighbour_1></babel_neighbour>

Es sollten nun blaue Linien zu den Routern gezogen werden, die diese fe80 Adresse haben (leider gibt mir Babel keine anderen Daten raus, daher wäre fe80:: für mich das einfachste, ich hoffe das ist kein großes Problem im Monitoring?).
Dabei gibt es zu beachten, das nicht jeder Nachbar auch auf der Karte ist. So ist z.b. in diesem Fall neighbour_1 ein Server im RZ welcher nur per VPN angebunden ist. Da den seine fe80:: nicht im Montioring auftauchen wird, kann dieser auch ignoriert werden. Die andere fe80:: <neighbour_0> in diesen Fall trifft z.b. auf diesen Router zu:

https://monitoring.freifunk-franken.de/routers/58e8a2c69369c3065adb1efb

Es sollte also dieser Router als Nachbar hinzugefügt werden und dorthin eine blaue Linie auf der Map dazu kommen.

Aktuell ist noch keine Metrik/Quality Berechnung mit dabei, kann sein das dies im 2. Schritt noch folgen wird. Ich möchte aber erstmal so schnell wie möglich so einfach wie möglich die Linie haben ;)

Vielen Dank

mfg

Christian

Indicate update of netif statistics by clicking panels

  • It is not clear that one can change the showed diagram by clicking on the interface, especially if the interface list get larger and the diagram scrolls away (e.g. when showing w2ap)
  • It is not possible any more to show more than one diagram at once (e.g. for comparing)

In summary, I like the behavior of the "old" netmon much more in this field.

wrong connection state due to the caching of tiles

It happens that connection state (online/offline) for nodes are displayed false on the map. This is also the case for connections.

This error ist due to the local caching of tiles. It happens for example that the connection state changes while changing the zoom-level.

I strongly would suggest to render the "dots" and "lines" on the client. Leaflet has perfekt support for this. This also would reduce the dependencies on the server, because mapnic would not be needed anymore.
I tried to fix this issue but i could not satisfy all the development-dependencies on my (old) ubuntu system.

By the way: I'm very happy to see how the map improves and I realy like to use it!

Standartinterface wenn kein br-mesh vorhanden

Unter "Network Interfaces" wird anscheinend standardmäßig immer das br-mesh angezeigt. Wenn das Endgerät kein br-mesh hat wird standardmäßig eine leere Grafik angezeigt Bsp:
https://monitoring.freifunk-franken.de/routers/595cb32a9369c33d77d603f9
Es wäre schöner wenn da einfach das erste Interface herausgepickt wird, noch schöner wäre es wenn man als Owner das Interface auswählen kann das standardmäßig angezeigt wird, erspart einen dann einen Klick ;)

HofV2 alfred-Daten verursachen Fehler

Exception:
400: Bad Request

Skript am Gateway:

#!/bin/bash

api_url="https://monitoring.freifunk-franken.de/api/alfred"
fetch_ids="64"

for fetch_id in $fetch_ids
do
    data=$(/usr/local/bin/alfred-json -r "$fetch_id" -s /var/run/alfred.sock)
    /usr/bin/curl -k -v -H "Content-type: application/json; charset=UTF-8" -X POST --data "{\"$fetch_id\": $data}" $api_url --trace-ascii /dev/stdout
done

Gelöschte Router in Extra "Hood"

Hallo,

wäre es möglich die offline Router die nach X Tagen gelöscht werden in eine für Admin Sichtbare Tabelle zu bekommen?

Hintergrund der Frage ist, das man nicht sieht wie ein Router gelöscht worden ist oder ob er nur umbenannt worden ist.

Mir würde Routername Mac-Adresse und Nutzer ja ausreichen und halt ein last seen

Koordinaten als Text in Routerdetailpage anzeigen

Hatte schon oft das Problem, dass ich einen gebrickten Router ersetzen wollte. Hier kriegt man alles aus dem Monitoring, außer die Koordinaten (zumindest ohne im Code zu wühlen).

Implementierung mach ich demnächst voraussichtlich selbst.

Hat jemand ein Problem, wenn das einfach mit bei den Routerdetails steht?

tweet each new router

Hi,
in the past the netmon was connected to the twitter account @FreifunkFranken. it tweeted about every new router which was registered. It would be nice if this was still the case :)

Can someone build this?

Netmon Abhängigkeiten entfernen

Hi

da der Netmon nun nicht mehr existiert kann alles entfernt werden was in irgendwelcherweise vom Netmon abhängt (und auch alle Issues zum Thema Netmon hier können zugemacht werden da sie damit hinfällig sind). Auf Anhieb fällt mir das ganze sync Zeug ein sowie der Button Actions -> Trigger Netmon Sync. Auch der legacy Provider ist aus und auch da kann alles entfernt werden.

Gruß Christian

Avg Load Graph

Hallo

ich fände einen avg load Graph nicht schlecht. Ich hab aktuell einen Router mit hoher Auslastung und hohen Load Werten, da würde mir ein Graph bei der Diagnose sehr helfen.
Die Daten werden in der Json ja schon mitgeschickt, es müsste "nur" ein Graph gebaut werden.

Gruß Christian

Nodeliste für batctl/bat-hosts

Siehe #47:

https://downloads.open-mesh.org/batman/manpages/batctl.8.html (Abschnitt FILES)

  *translate*|*t*  *MAC_address*|*bat-host_name*|*host_name*|*IP_address*

           Translates a destination (hostname, IP, MAC, bat_host-name) to
           the originator mac address responsible for it.

root@Gasthof-Rittmayer-Keller:# batctl translate AischerKerwa2017
Error - mac address of the ping destination could not be resolved and is
not a bat-host name: AischerKerwa2017
root@Gasthof-Rittmayer-Keller:
# batctl translate 86:16:F9:66:41:58
86:16:f9:66:41:58
root@Gasthof-Rittmayer-Keller:~#

Monitoring-Umzug

Mein MySQL-basierter Monitoring-Clon ist nun soweit, dass er einsatzfähig ist. Der kritische Schritt ist dabei die Nutzer-Datenbank.

Wir müssten also mittels des angehängten Skriptes die UserDB in einen CSV-File schreiben, damit ich die dann wieder ins MySQL einlesen kann.

Falls dies gewünscht/okay/akzeptabel ist, wäre 18.11. nachmittag oder 19.11. den ganzen Tag eine günstige Gelegenheit. Gerne können wir dann auch gleich Zugänge zum neuen Server verteilen ...

http://fff-monitoring.fff.community/

Beste Grüße

Adrian
users2csv.txt

Orphaned router in der Map anders behandeln

Da einige scheinbar die orphaned router aus der Karte raushaben wollen, wäre folgendes zu überlegen:

Man schafft einen zusätzlichen Status "orphaned" (also statt online/offline/unknown), z.B. nach 14 Tagen offline.

Dies könnte man dann verschieden für die Karte implementieren:

  1. Man schaltet die orphans wie den Hood Layer mittels Haken an und aus (k.A. wie einfach das umzusetzen ist).
  2. Man schmeißt die orphaned router komplett aus der Karte raus und lässt sie nur in den Listen. Problem: Hier muss man die Übersichtskarte und die Routerdetailkarte unterschiedlich behandeln.

Notiz: Für die Statistik müsste man hier noch Anpassungen vornehmen.

Meinungen?

Router Seite, Average Statistik wird nicht angezeigt, bei Interfaces nichts auswählbar

Fehler passiert in Version 61.0.3163.91 (Offizieller Build) (64-Bit)
Firefox 55.0.3 (64-Bit) nicht betroffen.

59c0f9e79369c36749e72188:398 Uncaught ReferenceError: loadavg_graph is not defined
at HTMLDocument. (59c0f9e79369c36749e72188:398)
at j (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.J (jquery.min.js:2)
(anonymous) @ 59c0f9e79369c36749e72188:398
j @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
J @ jquery.min.js:2

MAC - Nodename alias Liste für Wifi Analyzer

Bei WifiAnalyzer kann man eine Aliasliste erstellen.
https://play.google.com/store/apps/details?id=com.farproc.wifi.analyzer&hl=de
So sieht man anstatt der SSID den Nodenamen.
Die formatierung:

#----------WifiAnalyzer alias file----------

#Encoding: UTF-8.
#The line starts with # is comment.

#Content line format:
#bssid1|alias of bssid1
#bssid2|alias of bssid2

https://pastebin.com/yvT878ES (Habe noch FFF- vorangestellt)
Gibt es eine möglichkeit die MAC Adressen mit zugehörigem Nodename zu exportieren (pro hood)?

Alfred Proxy

  • Python Package for Alfred Proxy
  • Create Hook API (i.e. /etc/alfred/hook.d/) with subclasses of API class
    • Port monitoring push part to hook

Hoodname anklickbar machen

Hi

Danke erstmal für die Arbeit mit der Hood, schaut gleich viel schöner aus 👍 )

Eine Sache hätte ich jetzt noch:
Überall wo ein Hoodname steht, sollte dieser anklickbar sein.
Am schönsten wäre es, wenn dann auf die Map Seite weitergeleitet wird dort aber nur die Router der angeklickten Hood angezeigt werden, vllt. über einen Parameter in der URL oder so?

Gruß Christian

ES2015 support for old browsers

A lot of browsers do not jetzt support all ES2015 features yet (e.g. for...of).
You should use something like bable.js to also older or more alternativ browsers.

Privacy and Security Concerns

ff-map uses external java-script (jquery and bootstrap) which are not hosted on the same server, instead they are served by content delivery networks (CDNs) , namely Google and MaxCDN.
I know about the pros of doing it like it is done here but for me the cons are more concerning:

  • privacy issues by logging of all our users ip addresses
  • tracking of all our users by cookies etc.
  • trust, who guarantees that the java-script file was not tempered with (this could be solved with Subresource Integrity)

What do you think about hosting the two java-script files ourselves? I would create a pull request if you agree.
Or do you have a better idea?

Use a relational DB for structural data and rrd for historical statistics

Now, a mongoDB is used for everything, which creates a lot of load because of using BSON. For structural data (hoods, routers, interfaces), a relational DB is much better. MongoDB could be used for complex unstructured data - perhaps config files could be one point. For historical statistics (number of clients, bandwidth etc.), rrd fits way better.

WebUI-Link über ULA

Da wir beim neuen KeyExchangeV2 ULA-Adressen vergeben können, sollten entsprechende Router über diese zum WebUI verlinkt werden. Siehe auch:
#66

Werde das evtl. selbst implementieren, dies dient nur als Erinnerung.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.