Is there such a thing as an activity report in OC?

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
ownCloud 5.x reached end of life and is officially unsupported. For details see Wiki page.

Please upgrade your ownCloud.
eddantes
Beginner
Posts: 25
Joined: Mon Apr 15, 2013 7:08 pm
ownCloud version: 8.1.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.9

Is there such a thing as an activity report in OC?

Postby eddantes » Mon Apr 15, 2013 9:38 pm

I don't see anything... I suppose once can cobble together something from the logs... Anyways, if anyone knows of anything let me know - (report showing uploads/downloads/shares/etc... over a period of time). If not - I'll make a feature request in the appropriate forum.

bigworm
Beginner
Posts: 43
Joined: Thu Aug 30, 2012 10:02 pm
ownCloud version: 5.0.3
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4

Re: Is there such a thing as an activity report in OC?

Postby bigworm » Mon Apr 15, 2013 9:42 pm

No and plans for one are far off as far as I know...I recently implemented piwik into my owncloud install and it does a good job.

eddantes
Beginner
Posts: 25
Joined: Mon Apr 15, 2013 7:08 pm
ownCloud version: 8.1.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.9

Re: Is there such a thing as an activity report in OC?

Postby eddantes » Mon Apr 15, 2013 10:00 pm

bigworm wrote:No and plans for one are far off as far as I know...I recently implemented piwik into my owncloud install and it does a good job.


Thanks for the reply!

Care to elaborate? Beyond simply implementing the analytics package did you need to customize in any way?

bigworm
Beginner
Posts: 43
Joined: Thu Aug 30, 2012 10:02 pm
ownCloud version: 5.0.3
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4

Re: Is there such a thing as an activity report in OC?

Postby bigworm » Mon Apr 15, 2013 10:04 pm

You need to add the tracking code to three pages

core\templates\layout.user.php

core\templates\layout.guest.php

apps\files_sharing\templates\public.php

I also customized the code I inserted in the layout.user.php to capture the logged in username.

eddantes
Beginner
Posts: 25
Joined: Mon Apr 15, 2013 7:08 pm
ownCloud version: 8.1.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.9

Re: Is there such a thing as an activity report in OC?

Postby eddantes » Mon Apr 15, 2013 10:12 pm

bigworm wrote:You need to add the tracking code to three pages

core\templates\layout.user.php

core\templates\layout.guest.php

apps\files_sharing\templates\public.php

I also customized the code I inserted in the layout.user.php to capture the logged in username.


Got it! Thanks again!

bigworm
Beginner
Posts: 43
Joined: Thu Aug 30, 2012 10:02 pm
ownCloud version: 5.0.3
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4

Re: Is there such a thing as an activity report in OC?

Postby bigworm » Mon Apr 22, 2013 11:45 pm

Just realized that due to the Content Security Policy implementation in Chrome and the settings of OwnCloud piwik is not allowed to run. I had to dump the script in a .js file and put it in my owncloud folder... IE/FF/Safari all seem to work, but I imagine may stop in the future if they implement the CSP the same way chrome does.

AnybodyElse
Developer
Posts: 66
Joined: Tue Apr 02, 2013 8:43 pm
Webserver: Apache
Database: MySQL
OS: Linux

Re: Is there such a thing as an activity report in OC?

Postby AnybodyElse » Tue Apr 23, 2013 12:08 am

bigworm wrote:Just realized that due to the Content Security Policy implementation in Chrome and the settings of OwnCloud piwik is not allowed to run. I had to dump the script in a .js file and put it in my owncloud folder... IE/FF/Safari all seem to work, but I imagine may stop in the future if they implement the CSP the same way chrome does.


You don't have to put the JS file in the same folder. - Just adjust the default policy.

https://github.com/owncloud/core/blob/m ... e.php#L148

bigworm
Beginner
Posts: 43
Joined: Thu Aug 30, 2012 10:02 pm
ownCloud version: 5.0.3
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4

Re: Is there such a thing as an activity report in OC?

Postby bigworm » Tue Apr 30, 2013 3:39 pm

Thanks! That is exactly what I was looking for...now I just have to figure out what I need to change it to..

AnybodyElse wrote:You don't have to put the JS file in the same folder. - Just adjust the default policy.

https://github.com/owncloud/core/blob/m ... e.php#L148

learningdaily
Newbie
Posts: 3
Joined: Tue Aug 13, 2013 11:15 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Linux

Re: Is there such a thing as an activity report in OC?

Postby learningdaily » Tue Sep 10, 2013 10:51 pm

I found an add on app called superlog http://apps.owncloud.com/content/show.php?content=159124 It does something similar to what you maybe after. The unfortunate piece of this app is that it appears to log it to the owncloud database and just on the website.

Could you all give me more details on how to use the piwik tool? like how you customized for username and what you had to adjust in the security file. Looks like an interesting way to extract last user logins or other activities occurring on the owncloud system.

bigworm
Beginner
Posts: 43
Joined: Thu Aug 30, 2012 10:02 pm
ownCloud version: 5.0.3
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4

Re: Is there such a thing as an activity report in OC?

Postby bigworm » Fri Feb 07, 2014 11:57 pm

In the config.php file there is a section for Custom CSP policy. I changed that to

Code: Select all

'custom_csp_policy' => 'default-src \'self\'; script-src \'self\' http://mypiwiksite.com \'unsafe-inline\' \'unsafe-eval\'; style-src \'self\' \'unsafe-inline\'; frame-src *; img-src *; font-src \'self\' data:; media-src *',


Then inserted the piwik supplied tracking code on the pages I mentioned previously. Piwik also gives you the capability to define and track custom variables. So I followed that and then figured out from the owncloud php code that

Code: Select all

"<?php  p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?>"

would return the logged in user.

It tracks all activity the user has, but I am mostly just interested in what files they download.

Of course this may all be a moot point now with the Activity stream in OC6...I just upgraded so I haven't had a chance to see if it is going to give me all the same info.

learningdaily wrote:Could you all give me more details on how to use the piwik tool? like how you customized for username and what you had to adjust in the security file. Looks like an interesting way to extract last user logins or other activities occurring on the owncloud system.
Last edited by bigworm on Tue Feb 11, 2014 7:10 pm, edited 1 time in total.


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Community Edition 5.x and older”

Who is online

Users browsing this forum: No registered users and 0 guests