lady:factory:logdive

Logdive

Central Log managment/browser

Binnacle is a web application to browse, filter, search through logs stored in a central database. I developed this tool after the tool I used before become unmaintained and I would like to implement some features/enhancements.

I know there are many very powerful, solutions like logstash and others, but they overwhelm my needs and requires more rsources and configuration, as well as deploying java which I don't like to use on servers.

  • Log rotation
  • DB partitioning for efficiency
  • Log filtering by fields
  • Easy time range selection via UI
  • Archive logs (to avoid data loss when they expire/rotate)
  • Filter save (selection, like a bookmark without fixed time range)
  • Simple text search
  • Simple tabular cross reports
  • Decouple Statistics
    • Cache summary/stats data
    • Advanced text search (work, normalize, …)
    • Regexp suppport
    • Tokenize messages to enable click-to-search
    • Reporting
    • Message histogram
    • Scheduled reports
    • Host and program analysis
    • Presets
  • Javascript hacks to be able to use ajax on ajax-loaded content
  • URLs cannot end with Slash
  • Some log messages got cut due not escaping strings (Seems upstream in DB logging)
  • Escape of archive naming
  • Archive view seems not sorted chronologically
  • Rotation wrongly warns on end of month
  • CodeIgniter (working on 3.0.4, may work with newer releases)
  • MySQL Database, with PARTITION engine enabled
  • a SysLog daemon with DB capabilities. I use rsyslog but syslog-ng should also work

I usually doesn't provide packaged download, instead I try to keep the development trunk free of bugs, so usable. For big changes I usually use a separated branch to not affect main trunk of development.

In case the software have few changes (either because is stable enough or even because I don't maintain it actively) I provide packaged tarballs.

There is a INSTALL document on the code, although, basically you will need to setup CodeIgniter Framework.

Database

Using your credentials, create a database and a user with rights on the MySQL Database, i.e.:

CREATE DATABASE syslog;
GRANT ALL ON syslog.* TO 'binnacle' IDENTIFIED BY PASSWORD

Create the needed tables:

$ mysql -u root -p syslog < binnacle/logdb.sql

Setup the configuration acccordingly on the following config files (you can use provided template):

binnacle/config/appconfig.php

Initial DB setup can be done running logrotate once:

$ php binnacle.php manager logrotate

Cron maintenance

You will need a cron job to carry out DB maintenance:

Setup a cronjob using binnacle/cron.conf as sample, you need to modify the path to point to where you installed binnacle, also depending on the setup you may need to modify the user under which runs

Logging into the database

For both rsyslog and syslog-ng there are sample configuration on the root directory of the app. Copy and adjust them for your setup

Obviously this software/stuff is provided as-is under the GPL without any support. But I provide here help on issues or known problems as I can.

In case you would like to contact me for some, well detailed and tested issue, or even better provide a fix/enhancement you can send me an email at srcmaster@l3jane.net

  • lady/factory/logdive.txt
  • Last modified: 2023/06/26 15:13
  • by Count Zero