1

Is there a module for querying and creating summary reports of the Database logs?

I need something that can create an equivalent of SQL Group by queries on the Database logs, eg, group by type, severity, count, IPs etc, and create views and possibly graphs on them.

3
  • When you say database logs do you mean the watchdog table?
    – rooby
    Jan 21, 2015 at 8:43
  • @rooby I don't know which table or combination of tables it is but it is the one used by core's Database logging module (Logs and records system events to the database) to generate the Recent log messages ie admin/reports/dblog
    – vfclists
    Jan 21, 2015 at 8:54
  • 1
    Yep that's the watchdog table.
    – rooby
    Jan 21, 2015 at 9:00

2 Answers 2

4

The Views Watchdog module might be useful.

The Views Watchdog module extends the Views module and allows to create customized lists (pages, blocks, feeds) of watchdog entries.

Combine it with the Charts module and a bit of custom code and you should be able to get a wide array of reports.

1

Here are some modules to consider:

  1. The Charts module is indeed something you may want to consider for this. Refer to the recently created community docu about it for details. It should make it clear that "a bit of custom code" is indeed one of the possible approaches (using the Charts API). But it also offers Views integration that can typically be used by site builders also (without coding).
  2. The Chart module (which is different from Charts ...) includes a system charts component. However, it appears to be rather undocumented (and hence unknown?). The goal of the issue about Docu about system charts? is to get that documented. For now the headers and menu tabs in the screenprint attached to issue 418736 should explain the kind of info you can get from it, watchdog data is part of it.
  3. The Forena module is yet another module to be considered for watchdog related reported. It comes with all sorts of Sample reports and solutions, such as the Site administration reports, which contain data about the actual Drupal site.

    Here are some details about those reports:

    • Active Users - A variation of D7's admin/people, including hyperlinks to the Logs for User report.
    • Active Users Email - A demo of the ability to send email to all active users of a drupal site.
    • Logs for User - Most recent watchdog log entries for a user (specified as a report parameter).
    • Role Details - A table displaying all users for a Drupal role (specified as a report parameter), and the Drupal permissions granted to them, with for each user hyperlinks to either view or edit the user's profile.

    Cloning these sample reports into custom variations is straight forward. E.g. tune the active users report with some report parameters to only report about user registered this week. Or as in this report (with drill-down links also, i.e. the numbers in red in it):

    enter image description here

    Refer to my comment in the forena issue queue for more details about the above screenshot.

    There is even AbitMORE: this module also supports charting of those data (a typical related requirement ...).

  4. For somebody looking (only) for info related to visitors of a website, the visitors module might be a valid alternative to consider also (and/or addition to any of the above modules). Refer to its [community docu][11] for some more details.

Be aware: I'm a new (co-)maintainer of the first 3 modules, and the new maintainer of the last one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.