Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.
/ fluxbb-activity Public archive

Activity statistics dashboard for the FluxBB forum software

License

Notifications You must be signed in to change notification settings

BunsenLabs/fluxbb-activity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: There is no release, though it Works For Me™

fluxbb-activity

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

ScreenShot2017-08-28at00.07.42.md.png

Synopsis

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

Dependencies

  • python3

  • python-bottle

  • python-mysqldb

  • python-cherrypy (optional)

  • sqlite3

Installation

  • 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

Environment variables

  • FXBA_SQL_PASSWORD: Substitute for --sql-password command line argument to allow for removing the password from ps output.

Journal and data history

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.

About

Activity statistics dashboard for the FluxBB forum software

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published