Skip to content
This repository has been archived by the owner. It is now read-only.
Go to file



Mojology is a simple application to browse syslog messages stored in a MongoDB store, as logged by syslog-ng, using the mongodb destination driver.

For the curious, there is a demo available with a small set of log data.


  • Easy installation & configuration
  • A neat & lean web interface to browse logs
  • Built upon solid foundations: Flask, PyMongo, and HTML5 & AJAX - and degrades gracefully (usable even with lynx!)


The easiest way to install the application is to make use of virtualenv and pip - though, if one's distribution of choice has the appropriate packages available, and globally installed, that works just aswell. One will also need a recent version of the mongodb destination driver.

$ git clone git://
$ virtualenv --no-site-packages mojology
$ cd mojology
$ . bin/activate
$ pip install -r requirements.txt
$ python

This will start up the server with the default settings, and expects that the database and collection are ready to be browsed.

On how to set up syslog-ng to create appropriate entries within our collection, see the next section!


Though one can customize the database layout to some extent, how to do that is out of the scope of this small document. Instead, we'll have a look at how to set up syslog-ng to produce documents with which mojology can work with.

By default, we only need a simple change: the DATE key must be a $UNIXTIME macro. Apart from this, mojology does not make many more assumptions, and by default, uses the same keys for the various bits of information (host, program, message, etc) that syslog-ng uses by default.

Thus, in order to get all the information mojology needs, along with every discovered (by patterndb or similar) key, one could use the following destination definition:

destination d_mongo {
                      scope(selected_macros nv_pairs)
                      pair("DATE" "$UNIXTIME")

Sprinkle the log block with some patterndb or other parser magic, and you're good to go!

If one wants to configure mojology itself, the best course of action is to copy the mojology/ file to the root directory, along with, and change values therein.

Alternatively, setting the MOJOLOGY_SETTINGS environment variable to the path of the desired configuration file will work just as well.


mojology is built upon free software, and is itself free aswell, released under the GNU GPL (version 3 or later).

The source code is available from github.


A simple application to browse syslog messages stored in MongoDB, as logged by syslog-ng.




No releases published


No packages published