Giter Club home page Giter Club logo

moodle-logstore_graylog's Introduction

Graylog Logstore for Moodle

Logstore plugin for moodle to ship logs to graylog or other log backends which supports the GELF format. This plugin requires that you have a working Graylog node. Graylog can be downloaded for free from graylog2.org. Transport protocols TCP and UDP are supported.

Log timestamp in Graylog is directly taken from moodle log entry's timecreated. Useful when importing logs from moodle to graylog in a live moodle installation.

The array in other column in standard logstore is sent as a JSON string as of now. Users can use the "JSON Extractor" feature of Graylog in the other field to store them as separate fields in Graylog.

Please use Github Issues for bug reports, feature requests and send code contributions as Github Pull Requests.

Installation

  1. Create a new Input of type GELF UDP or GELF TCP in Graylog from the Graylog web interface at system/inputs.
  2. Unzip this plugin to directory admin/tool/log/store/ in your moodle installation.
  3. Navigate to "System Administration -> Notifications" to install the plugin & configure Graylog input details.

This plugin can operate in two modes, just like the splunk logstore plugin.

  • Realtime -> Logs are sent to graylog as soon as they happen.
  • Background -> Logs are stored in standard logstore and new log entries are sent to graylog once every minute during cron run. Background mode can be used to import existing logs into graylog. Graylog Logstore ships the old logs in batches to Graylog every minute. Once the import is done (check reports->graylog), you can switch back to realtime.

Heavily inspired by the splunk logstore at https://github.com/unikent/moodle-logstore_splunk. Thanks Skylar Kelty!

This plugin uses composer to manage dependencies and is currently dependent on the composer package graylog2/gelf-php which is, in turn, dependent on psr/log. These dependencies are included with the release archive but not maintained in git.

TODO

  • Implement other transports which GELF supports, such as, Kafka / AMQP, HTTP.
  • Use LearningLocker/Moodle-Log-Expander or something similar to expand IDs. Better if logstore evolves automatically whenever the Moodle-Log-Expander project has new log types implemented.

moodle-logstore_graylog's People

Contributors

dbinoj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gtn call-learning

moodle-logstore_graylog's Issues

Possibility to import old logs ?

Hi,
thanks a lot for this great plugin !!!
It works great here, i just want to know if there is a possibility to import all logs with it ?

Thanks again ๐Ÿ‘
Johan

PS: we are really interested into your TODO

Use LearningLocker/Moodle-Log-Expander or something similar to expand IDs. Better if logstore evolves automatically whenever the Moodle-Log-Expander project has new log types implemented.

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.