Note: There is no release, though it Works For Meβ’
Activity stats dashboard for FluxBB mining the SQL database. The tool consists of a Python backend and a JS, in-browser frontend.
- Flexible SQL-based data gathering system
- Data journal with historical data, well-suited as a chart/delta/trend data source
- REST-API for both current and historical data
- Nice in-browser charts (based on Chart.js)
- (Relatively) good-looking default dashboard included
usage: __main__.py [-h] [--address ADDRESS] --sql-db SQL_DB
[--sql-password SQL_PASSWORD] [--sql-socket SQL_SOCKET]
--sql-user SQL_USER [--port PORT] [--timeout TIMEOUT]
--journal JOURNAL
optional arguments:
-h, --help show this help message and exit
--address ADDRESS
--sql-db SQL_DB
--sql-password SQL_PASSWORD
--sql-socket SQL_SOCKET
--sql-user SQL_USER
--port PORT
--timeout TIMEOUT
--journal JOURNAL
-
python3
-
python-bottle
-
python-mysqldb
-
python-cherrypy (optional)
-
sqlite3
- Install the Python3 dependencies
- Clone the repository:
git clone https://github.com/BunsenLabs/fluxbb-activity.git
- Run the Python service and point it to your FluxBB MySQL database:
python -m fluxbbactivity --address 127.0.0.1 --port 10000 --sql-db fluxdb0 --sql-socket /var/run/mysqld/mysqld.sock --sql-user reader --sql-password secret --timeout 1800 --journal journal.sqlite
- Point your browser to the index page:
http://127.0.0.1:10000/index.html
, enjoy
FXBA_SQL_PASSWORD
: Substitute for --sql-password command line argument to allow for removing the password fromps
output.
The service keeps a data history as a sqlite3 database with the following table schema:
CREATE TABLE fluxbbajournal (
apiversion INTEGER,
date TEXT,
query TEXT,
value TEXT
);
apiversion
-- denotes the query naming scheme version. Must now be 0.date
-- timestamp in ISO 9660 format.query
-- name of the query, corresponding to its .sql file path below ./sql.value
-- the query result, in JSON format just as it would have been available through the API.