Sammelt ALFRED-Daten und verteilt sie an verschiedene Dienste weiter (Karte, Bot, Graphite, Knoten-Management, etc.)

Helge Jung 4db5584e42 move data merge logic from batcave.py into BaseStorage hace 10 años
contrib 55eca34b31 rename to BATCAVE hace 10 años
ffstatus 4db5584e42 move data merge logic from batcave.py into BaseStorage hace 10 años
.gitignore 936f6690a6 server: add GET /providers (optional ?format=csv) hace 10 años
Readme.md 9d5136b776 extend/update documentation hace 10 años
batcave.py 4db5584e42 move data merge logic from batcave.py into BaseStorage hace 10 años
requirements.txt 081c8db017 add requirements.txt listing all necessary packages hace 10 años

Readme.md

BATCAVE

Batman / Alfred Transmission Collection, Aggregation & Value Engine

Dieser Daemon läuft auf einem Rechner der im Freifunk-Mesh hängt und fragt periodisch (Default = 15s) die Batman- und Alfred-Daten ab.

Die Daten werden aggregiert und können anschließend an mehrere Datensenken weitergegeben werden:

  • Knoten-Management (allgemeine Meta-Daten zu eigenen Knoten)
  • Graphite (Knoten-Graphen und Detail-Statistiken)

Zusätzlich besteht die Möglichkeit der Datenabfrage über eine HTTP-JSON-Schnittstelle.

Voraussetzungen

Installation

sudo apt-get install python-daemon python-requests
sudo ln -s "`pwd`/contrib/init-script.sh" /etc/init.d/ffstatus
echo "DAEMON_DIR=`pwd`" | sudo tee -a /etc/default/ffstatus
sudo update-rc.d ffstatus defaults
sudo update-rc.d ffstatus enable

Nutzung

usage: batcave.py [-h] [--logfile LOGFILE] [--interval INTERVAL] [-v] [-d]
                  [-n] [-A ALFRED_JSON] [-B BATADV_VIS] [-G GRAPHITE_HOST]
                  [--graphite-port GRAPHITE_PORT] [--dashing-url DASHING_URL]
                  [--dashing-token DASHING_TOKEN]
                  [--api-bind-host API_BIND_HOST]
                  [--api-bind-port API_BIND_PORT] [-S STORAGE_DIR]

Batman/Alfred Transmission Collection, Aggregation & Value Engine

optional arguments:
  -h, --help            show this help message and exit
  --logfile LOGFILE     path for log file
  --interval INTERVAL   data poll interval
  -v, --verbose         increase output verbosity
  -d, --no-detach       Don't detach (daemonize) ourself
  -n, --no-send         Fetch data but don't send it
  -A ALFRED_JSON, --alfred-json ALFRED_JSON
                        executable path for alfred-json
  -B BATADV_VIS, --batadv-vis BATADV_VIS
                        executable path for batadv-vis
  -G GRAPHITE_HOST, --graphite-host GRAPHITE_HOST
                        Graphite host
  --graphite-port GRAPHITE_PORT
                        Graphite port
  --dashing-url DASHING_URL
                        Dashing URL
  --dashing-token DASHING_TOKEN
                        Dashing's secret update token
  --api-bind-host API_BIND_HOST
                        API-Server Hostname
  --api-bind-port API_BIND_PORT
                        API-Server Port
  -S STORAGE_DIR, --storage-dir STORAGE_DIR
                        Path where to store data