Page 1 of 1

GroupOffice logging

Posted: Thu Feb 07, 2013 11:19 am
by DanielMalmgren
Hi.
GroupOffice logs an insane amount of data to go_log in the database. Our complete GO database is right now 1.8GB, go_log is 1.5GB of this. A couple of questions relating to this:

1. Is it really needed to log this much? It seems one single activesync session can spawn hundreds of identical log lines for just one sync, why is this?

2. Is there any good way of removing old stuff from the log? We don't really need to keep this information for ever and ever. Is this just a question of a "delete from go_log where ctime < something" in the database?

3. Is there any chance of the searching capabilities in GO being improved? There is no point in having a log if you can't simply get out what you want from it. For example getting a list of all occurances when Jane Doe logged in last month seems impossible right now using only the web interface.

/Daniel

edit: Forgot to mention, according to our investigation go_log stands for about 75% of the total load on our mysql server...

Re: GroupOffice logging

Posted: Thu Feb 07, 2013 11:55 am
by rosetta

Re: GroupOffice logging

Posted: Thu Feb 07, 2013 11:58 am
by rosetta
Also, on my phone ActiveSync seems to sync contacts simply because I have called them.

So if I call a contact from my phone, and then sync it - the contact is "updated" in GO and result in a log entry. Even though the contact data has not changed.

Re: GroupOffice logging

Posted: Thu Feb 07, 2013 12:12 pm
by DanielMalmgren
eagle wrote:Have you considered this?

http://wiki4.group-office.com/wiki/Activity_log
Ah, thanks. Guess that answers my question 2. I don't dare trying this during office hours, guess I'll have to try tonight...

/Daniel

Re: GroupOffice logging

Posted: Mon Mar 18, 2013 11:52 am
by DanielMalmgren
I'd hoped to get some input from Intermesh on this one. Since I (naturally) forgot to do anything about the log rotating, today our mysql server turned out of disk. Now go_log is 5.5 GB.

I've also looked a bit at exactly WHAT in the log actually uses up all that space. Some numbers:

Code: Select all

mysql> select count(*) from go_log;
+----------+
| count(*) |
+----------+
| 42557820 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from go_log where action = 'update';
+----------+
| count(*) |
+----------+
| 41731378 |
+----------+
1 row in set (25.85 sec)

mysql> select count(*) from go_log where action = 'update' and (model = 'GO_Base_Model_User' or model = 'GO_Addressbook_Model_Contact');
+----------+
| count(*) |
+----------+
| 41333819 |
+----------+
1 row in set (39.84 sec)
Seems like actually the sync of contacts using activesync is the big issue here (with 97% of all lines in the log) if I'm not misunderstanding. Is it really that interesting knowing every time a user syncs a contact to and from their phone?

Sorry for whining here, but since I can't even look at the code for the z-push backend I can't really do anything about it myself and the log function is really useless as it is now.

/Daniel

Re: GroupOffice logging

Posted: Wed Mar 20, 2013 8:01 am
by mschering
Any save and delete action is logged. IMHO that is useful. But the rotation should have been setup by default.

With debian packages /etc/cron.d/groupoffice-log is created by default. For manual installs take a look at modules/log/README.TXT

Re: GroupOffice logging

Posted: Wed Mar 20, 2013 8:14 am
by rosetta
One issue, at least the last time I looked into this, is that simply calling a person on the phone makes Z-push think that the contact has "changed" and it will be synced.

So if you have called or received a call from 30 contacts all of those will be "updated" in GO - even though none of their fields have been changed.

In the GO log module, the contact is shown as "updated" (but all fields in GO are the same).

Re: GroupOffice logging

Posted: Wed Mar 20, 2013 8:53 am
by mschering
The logging module is not so smart that it can detect that. It just logs save actions.