Git Product home page Git Product logo

fluxbb-activity's Introduction

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.

fluxbb-activity's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

smersh2 tubbz-alt

fluxbb-activity's Issues

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.