mod_logmnesia - Log user messages to mnesia.
Version: 1.3a
WARNING!!! This module is depricated and not supported. Use mod_logdb instead.Author: Oleg Palij (mailto,xmpp:o.palij@gmail.com)
Requirements: ejabberd 1.1.2.
DESCRIPTION:
This module sniffs all the user messages send through ejabberd.
It logs messages to a build-in erlang database (mnesia).
Logged messages can be viewed through ejabberd web admin interface.
This module reuses some code from mod_logxml.
INSTALL (*nix):
1. Download this patch
1.1 Here is optional patch to avoid messages tables dump while ejabberdctl node@host dump file
2. Change dir to your ejabberd sources:
# cd /usr/local/src/ejabberd-1.1.2/src
3. Apply patch:
# patch -p0 < patch-src-mod_logmnesia
4. Rebuild/reinstall ejabberd
5. Add to ejabberd.cfg, 'modules' section, the basic configuration:
{mod_logmnesia, []},
6. Restart ejabberd.
INSTALL (Windows):
1. Download this file.
2. Unpack.
3. Copy *.beam files to ejabberd ebin folder.
4. Copy *.msg files to ejabberd priv/msgs folder.
5. Add to ejabberd.cfg, 'modules' section, the basic configuration:
{mod_logmnesia, []},
6. Restart ejabberd.
CONFIGURE:
ignore_jids:
Ignore messages sent to or from JIDs in the list.
Default value - [].
groupchat:
This defines how to process groupchat messages.
possible values:
all - to log all groupchat messages
send - to log only sent by user messages
none - to disable logging of groupchat messages (recommended value, use mod_muc_log for groupchat logging)
Default value - none.
purge_older_days:
For automatic purging of messages older than specified value.
possible values:
never - do not perform automatic purging of messages
Number - perform daily automatic purging of messages older than Number (in days)
Default value - never.
To keep only "today's" messages set Number to 0.
EXAMPLE CONFIGURATION:
{mod_logmnesia, [
{ignore_jids, ["bigboss@example.com", "bot@example.org"]},
{groupchat, none},
{purge_older_days, 365}
]},
ejabberdctl COMMANDS:
purge-old-records Days - it purges all logged messages older than Days. You can use it in crontab to automatize this process (or you can use purge_older_days option).
vhost your-vhost-here rebuild-stats - in some rare (I hope :)) cases it is possible that statistics become corrupted, this command rebuilds statistics for vhost.
Changelog:
1.3a - 2006-10-10
* add the appropriate navigation support for ejabberd Web Admin navigation bar (by Nathan Faust)
1.3 - 2006-10-09
* added ability to filter messages by interlocutors (while viewing user messages)
* added resource storing in db
WARNING!!! WARNING!!! WARNING!!! WARNING!!!
This version make changes in messages tables structure (this must not be destructive, but who knows.....),
so if you really need your messages log, please, backup your data before upgrading.
After starting ejabberd you can see upgrading proccess in log, this must be following messages:
Converting 'messages_2006-09-30'
Successfully converted 'messages_2006-09-30'
And so one for all messages tables...
If you see messages with: Failed to convert, please send me full output.
1.2a - 2006-10-09
* added nl translation (by Sander Devrieze)
* added ability to delete stats for nonexistent tables while rebuilding stats
1.2 - 2006-08-28
* bugfix (improved tables locking while logging message)
* added purge_older_days option
* the time of a message writes now accurate within microseconds
for proper sorting of messages recieved within a second
1.1b - 2006-08-24
* bugfix (improved tables locking while rebuild-stats)
1.1a - 2006-08-23
* bugfixes
* added ru and uk translations
1.1 - 2006-08-22
* added manual selective erasing of messages through web admin
* added groupchat option
* added sort by date in common vhost and user view
* lot of bugfixes
1.0 - 2006-08-19
* Initial version
USAGE:
Open the web interface (http(s)://server:port/admin/) in your favourite browser.
Go to http(s)://server:port/admin/server/you_vhost_name/
You should see 'Users Messages' link in the bottom of links list.

'Users Messages' link shows statistic about logged messages for virtual host by date.

After pointing to concrete date you should see day statistic about logged messages for virtual host.

Point on user to see logged messages for this user at choosen date.

Or you can point your browser to user properties:
You should see 'Messages' link in the bottom of links list.

'Messages' link shows statistic about logged messages for this user.
