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

Helge Jung 966870f26d add 'location' from ALFRED data 10 years ago
contrib 55eca34b31 rename to BATCAVE 10 years ago
ffstatus 966870f26d add 'location' from ALFRED data 10 years ago
.gitignore 3db322ca2c Storage: make an auto-backup 10 years ago
Readme.md 9d5136b776 extend/update documentation 10 years ago
batcave.py a1d6a620da renamed Storage into FileStorage 10 years ago
batcave.sublime-project ae8979e552 add Sublime project file 10 years ago
requirements.txt 081c8db017 add requirements.txt listing all necessary packages 10 years ago

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