Luminis Statistics from Uportal
February 23, 2007 | 3 Comments
Note: this is a reposting of an article I wrote on LumDev.net April 12, 2005. I am publishing it here because LumDev is currently experiencing technical difficulties. I have not updated this post in any way to reflect new versions or practices. It is still the 2005 article in every way. I would highly recommend reading that article’s commentary if LumDev.net is available when you are reading this.
As many of us who use and administer Luminis know, the stats are quite inadequate straight out of the box. There are some improvements in III.2, but they are still not enough. Some posts on here have suggested some other solutions that gain some ground. I have been instead researching Uportal’s build in StatsRecorderFactory support. After a lot of trouble initially getting this enabled, Grace Francisco at SCT support was finally able to get me what I was missing to try this out. The following is an account of how to enable these stats outlining what I like and don’t like about this solution. In short this is useful, but short of perfect.
1) cd CP_WEBINF/config
2) jar xf ../lib/uPortal.jar properties/portal.properties –> this actually will get picked up by our classpath, and much easier than editing the file, and rejarring it back to uPortal.jar
3) cd properties
4) edit portal.properties
5) change
#org.jasig.portal.services.stats.StatsRecorderFactory.implementation=org.jasig.portal.services.stats.DoNothingStatsRecorderFactory
to
org.jasig.portal.services.stats.StatsRecorderFactory.implementation=org.jasig.portal.services.stats.LoggingStatsRecorderFactory
6) turn the stat recorder settings ON, if you scroll down a few lines you can choose which ones you want.
7) bounce the webserver:
CP_ROOT/bin/rc/70-webserver stop
CP_ROOT/bin/rc/70-webserver start
8) add logging settings to CP_WEBINF/config/cplog4j.properties
# - STATS-RECORDER
log4j.logger.uportal=INFO, stats
log4j.appender.stats=org.apache.log4j.RollingFileAppender
log4j.appender.stats.File=${util.logservice.log4j.directory}/stats.log
log4j.appender.stats.MaxFileSize=10000KB
log4j.appender.stats.MaxBackupIndex=10
log4j.appender.stats.layout=org.apache.log4j.PatternLayout
log4j.appender.stats.layout.ConversionPattern=[%d{ISO8601}] %m%n
These are some of the log entries created in stats.log:
[2005-03-18 17:10:11,828] [INFO] WebServlet [uportal]: STATS-RECORDER: (cpadmin) logged in successfully at Fri Mar 18 17:10:11 MST 2005
[2005-03-18 17:10:30,937] [INFO] WebServlet [uportal]: STATS-RECORDER: Channel [E-mail Channel, 221, u11l1n13] was rendered in layout 1 by (cpadmin) at Fri Mar 18 17:10:30 MST 2005
[2005-03-18 17:10:30,937] [INFO] WebServlet [uportal]: STATS-RECORDER: Channel [Personal Announcements, 210, u11l1n14] was rendered in layout 1 by (cpadmin) at Fri Mar 18 17:10:30 MST 2005
[2005-03-18 17:10:30,937] [INFO] WebServlet [uportal]: STATS-RECORDER: Channel [Campus Announcements, 211, u11l1n15] was rendered in layout 1 by (cpadmin) at Fri Mar 18 17:10:30 MST 2005
[2005-03-18 17:10:30,937] [INFO] WebServlet [uportal]: STATS-RECORDER: Channel [My Headlines, 212, u11l1n17] was rendered in layout 1 by (cpadmin) at Fri Mar
[2005-03-18 17:12:43,015] [INFO] WebServlet [uportal]: STATS-RECORDER: Session destroyed for (cpadmin) at Fri Mar 18 17:12:43 MST 2005
The first major limitation of this is that it is logging all the stats in a file. So in my instance I am running a cron’d process hourly to go in and pick up the stats files, parse them, and load them into Oracle. My table structure is attached so that you can see the sort of info I’m am acquiring. The script I’ve written is in PHP and if anyone is really interested, I could share that as well. In a perfect world, there would be a Stats Recorder for Oracle, so that it could go straight in without the extra steps. Someone has written RDBMStatsRecorder which hits Postgres. That may be a good base for building an Oracle version. (Google search RDMBStatsRecorder to find out more).
The second limitation is that it is logging all the STATS-RECORDER entries into the cp.log as well as stats.log. This makes for a very dirty cp.log. Someone who knows more about log4j may be able to explain how to resolve this. I unfortunately do not…
The third limitation is that there is not a way to track what tabs are being accessed. This is an important statistic for a bunch of reasons. I reported this desire to support and they entered Enhancement Request #26422 on my behalf. Another option would be to try and glean these from the webserver logs, but of course then you would not have a username and associated role to tie to these stats, so I’m not certain how useful that might be… Better than nothing though.
You can see my PHP code here: http://my.plymouth.edu:81/code/stats.phps
Tags: cplog4j, java, luminis, php, statistics, stats, stats-recorder, sungard, sungardhe, uportal
