Tracking User Logins

Post Reply
LanceTylor
Posts: 66
Joined: Mon Feb 27, 2012 12:37 am
OLAP Product: TM1
Version: 10.2.2 Fix Pack 4
Excel Version: 2010

Tracking User Logins

Post by LanceTylor »

Hello All,

What is the easiest way to determine who has logged into TM1? We are conducting UAT and would like a list of who has actually been testing or even logged into TM1?

Thanks
Lance
User avatar
qml
MVP
Posts: 1094
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Tracking User Logins

Post by qml »

Switch Performance Monitor on and you will have the }StatsByClient cube populated with traffic statistics for all users who have used the system.

Another method is to look for their private folders in the TM1 data folder. When a user logs on for the first time TM1 will create a folder for them to store their private objects (even before they create any such objects). The folder will be named like the user and the timestamp on it will tell you the first logon date.
Last edited by qml on Fri Aug 02, 2013 9:19 am, edited 1 time in total.
Kamil Arendt
LanceTylor
Posts: 66
Joined: Mon Feb 27, 2012 12:37 am
OLAP Product: TM1
Version: 10.2.2 Fix Pack 4
Excel Version: 2010

Re: Tracking User Logins

Post by LanceTylor »

Thanks Kamil!
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: Tracking User Logins

Post by Steve Vincent »

Remember that performance monitor is only a current snapshot, not a historic reporting tool. if you want a full history then you would be better to write something that pulls the relevant entries from the server logs then upload those to a cube which you can keep the history in.
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Tracking User Logins

Post by Alan Kirk »

Steve Vincent wrote:Remember that performance monitor is only a current snapshot, not a historic reporting tool. if you want a full history then you would be better to write something that pulls the relevant entries from the server logs then upload those to a cube which you can keep the history in.
With the proviso that in the post-9.0 world Iboglix borked what was, up until that point, a nice, elegant piece of functionality to track user activity. To be able to still do that you now need to ensure that the ClientPropertiesSyncInterval config parameter is set to allow the client status to be tracked in the logs.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
st2000
Posts: 62
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Re: Tracking User Logins

Post by st2000 »

If I don't configure the interval very narrow, I would have always a lack of actuality. If I configure it to update frequently, IBM warns about problems.
Is there any way to trigger it proactive somehow? The docs don't indicate that, but maybe I use the wrong search terms.
I mean to configure the interval very infrequent (say 1x / day), and push it to update via TI just when I need to have the actual subset of clients being ACTIVE this moment?
Any idea is highly appreciated... :mrgreen:
-----------------------------------
Best regards,
Stefan
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Tracking User Logins

Post by gtonkin »

Noticing that you are running 10.2.2 FP4, you could probably take advantage of additional logging by configuring your tm1s-log.properties.
I had a similar scenario where my client wanted to know who was logging in and when as well as unsuccessful logins.

Have a look at this post for what I did and suggested to another member of this forum.

I now have a log file that I can analyze, process with TI, Excel etc. and feedback on. HTH
ellissj3
Posts: 54
Joined: Tue Jun 15, 2010 1:43 pm
OLAP Product: Cognos TM1
Version: 9.0 - 10.2
Excel Version: 2010

Re: Tracking User Logins

Post by ellissj3 »

try inserting this into the tm1s-log.properties

Code: Select all

### CREATE LOGIN FILE
log4j.logger.TM1.Login = DEBUG, LOGIN
log4j.appender.LOGIN = org.apache.log4j.SharedMemoryAppender
log4j.appender.LOGIN.MemorySize = 1MB
log4j.appender.LOGIN.File = tm1login.log
log4j.appender.LOGIN.MaxFileSize = 2MB
log4j.appender.LOGIN.MaxBackupIndex = 5
log4j.appender.LOGIN.TimeZone = Local
This will put an out of all user logins into a file called "TM1Login.Log"

The link above contains this exact post, who was probably the original author, which I shamelessly stole.
User avatar
MarkTM1
Posts: 4
Joined: Wed Mar 25, 2009 2:56 am
OLAP Product: TM1
Version: 10.2
Excel Version: Excel 2010

Re: Tracking User Logins

Post by MarkTM1 »

TM1Top's Log file could be another way to consider, need to have the Tm1top.ini file set to log activity.
e.g.
adminhost=
servername=planning sample
logfile=c:\temp\tm1top.log
logperiod=50
logappend=T
refresh=10
st2000
Posts: 62
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Re: Tracking User Logins

Post by st2000 »

I tried the way using the log4j logger. Generally, it works as the TM1llogin.log-File was created immediately. But when I log in to that server, the file keeps empty. Do I have to maintain some different switches somewhere to get some content into that file?

The tm1slog.properties resides now in the same folder like the tm1s.cfg which is noticed as a requirement in the tm1_op manual.
The (only!) content of the file is:

Code: Select all

log4j.logger.TM1.Login = DEBUG, LOGIN
log4j.appender.LOGIN = org.apache.log4j.SharedMemoryAppender
log4j.appender.LOGIN.MemorySize = 1MB
log4j.appender.LOGIN.File = C:\TM1MODELS\Metadatenmgmt\tm1login.log
log4j.appender.LOGIN.MaxFileSize = 2MB
log4j.appender.LOGIN.MaxBackupIndex = 5
log4j.appender.LOGIN.TimeZone = Local
Did I overlook something? I understood the tm1_op instructions like I have just to put the .properteis-file next to the .cfg and TM1 starts logging as configured.
-----------------------------------
Best regards,
Stefan
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Tracking User Logins

Post by gtonkin »

st2000 wrote: Thu Aug 03, 2017 3:32 pm...The tm1slog.properties resides now in the same folder like the tm1s.cfg which is noticed as a requirement in the tm1_op manual...
Just checking if this is a typo - is your file called tm1s-log.properties There must be a hyphen between tm1s and log.
lotsaram
MVP
Posts: 3648
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Tracking User Logins

Post by lotsaram »

I use this pretty much always and it works flawlessly

log4j.appender.USR=org.apache.log4j.SharedMemoryAppender
log4j.appender.USR.File=userlogin.log
log4j.appender.USR.MaxFileSize=5 MB
log4j.appender.USR.TimeZone=Local
log4j.logger.TM1.Login=DEBUG, USR
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
st2000
Posts: 62
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Re: Tracking User Logins

Post by st2000 »

Unfortunately my typo only occured in the post, but not in the filename... this would have been easier :lol:

I used lotsarams script, but faced the same experience: Log-file (userlogin.log) will be created after saving the file changes for ....properties.
Then starting Perspectives, logging in, logging out.
Then opened the userlogin.log-file: empty.
Expected: 2 entries documenting the login and the logout before (or at least the login).

As of blog entries concerning log4j (TM1-agnostic), the rootlogger-configuration is not neccessary as this exists anyway behind the scenes. And in your examples this is omitted as well. So I guess, this will not be the cause...

Could it be, that I have a wrong expectation about the frequency of updates performed by log4j? Perhaps the login/logout-events are triggered somewhere, but the file just updated in longer intervals...
It is a local installed Testdummy-TM1-installation I shut down every evening. Might I need to configure also the interval to write the lines down to the file more frequently?
-----------------------------------
Best regards,
Stefan
Drg
Regular Participant
Posts: 158
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: Tracking User Logins

Post by Drg »

st2000 wrote: Fri Aug 04, 2017 1:07 pm Unfortunately my typo only occured in the post, but not in the filename... this would have been easier :lol:

I used lotsarams script, but faced the same experience: Log-file (userlogin.log) will be created after saving the file changes for ....properties.
Then starting Perspectives, logging in, logging out.
Then opened the userlogin.log-file: empty.
Expected: 2 entries documenting the login and the logout before (or at least the login).

As of blog entries concerning log4j (TM1-agnostic), the rootlogger-configuration is not neccessary as this exists anyway behind the scenes. And in your examples this is omitted as well. So I guess, this will not be the cause...

Could it be, that I have a wrong expectation about the frequency of updates performed by log4j? Perhaps the login/logout-events are triggered somewhere, but the file just updated in longer intervals...
It is a local installed Testdummy-TM1-installation I shut down every evening. Might I need to configure also the interval to write the lines down to the file more frequently?
Read this:
https://www.ibm.com/support/knowledgece ... 503fe.html
search params begin 'audit'
st2000
Posts: 62
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Re: Tracking User Logins

Post by st2000 »

You mean I need to switch on the auditing function to get system logging?
That leads to "game over" for me. I reside in Germany, and if I would activate auditing (which logs much more than just logins...) I would at least get serious trouble with the working council (and probably commit a crime against a citizen right I would translate as informational self-determination, which also applies at work).

Thanks a lot to all repliers and sorry for confusion.
I didn't relate auditing with logging and thought, it were different functions. :oops:
-----------------------------------
Best regards,
Stefan
Wim Gielis
MVP
Posts: 3099
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Tracking User Logins

Post by Wim Gielis »

st2000 wrote: Fri Aug 04, 2017 3:13 pm You mean I need to switch on the auditing function to get system logging?
That leads to "game over" for me. I reside in Germany, and if I would activate auditing (which logs much more than just logins...) I would at least get serious trouble with the working council (and probably commit a crime against a citizen right I would translate as informational self-determination, which also applies at work).

Thanks a lot to all repliers and sorry for confusion.
I didn't relate auditing with logging and thought, it were different functions. :oops:
These are not related to each other.
I have a model running on my laptop where I tested the tm1s-log.properties contents of Lotsaram, yesterday. It worked beautifully.
I could see myself logging on and off.
The tm1s.cfg file of that model clearly has AuditLogOn=F.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Tracking User Logins

Post by gtonkin »

st2000 wrote: Thu Aug 03, 2017 3:32 pm I tried the way using the log4j logger....

Code: Select all

log4j.logger.TM1.Login = DEBUG, LOGIN
log4j.appender.LOGIN = org.apache.log4j.SharedMemoryAppender
log4j.appender.LOGIN.MemorySize = 1MB
log4j.appender.LOGIN.File = C:\TM1MODELS\Metadatenmgmt\tm1login.log
...
Have you tried just using tm1login.log for the file, without the path? just wondering if there may be some issue with Java and the slashes.

Code: Select all

log4j.appender.LOGIN.File = C:\\TM1MODELS\\Metadatenmgmt\\tm1login.log
Gave it a *quick* test on my side and may be the cure.
st2000
Posts: 62
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Re: Tracking User Logins

Post by st2000 »

Sorry for the late feedback. I tried it without a path: Defined logfile was created into the folder where the tm1slog.properties resides (same as TM1s.cfg). But empty. So generally the triggering works somehow under the hood, but not the entry of the log event.

Then I tried the style with double backslashs. In this case neither the file will not be created nor something else seems to happen.

We use an older TM1 version (10.2.0), maybe something was different at this version.
I will postpone this to the time we start a new project using PA.

Thank you all for your help, I will report if I stumble over the trick :)
-----------------------------------
Best regards,
Stefan
BrianL
MVP
Posts: 264
Joined: Mon Nov 03, 2014 8:23 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2 PA2
Excel Version: 2016

Re: Tracking User Logins

Post by BrianL »

I believe the TM1.Login logger was first made available in 10.2.2 FP1. Anything earlier than that will not create any login log entries.
Robster
Posts: 13
Joined: Tue Nov 22, 2016 9:53 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: Tracking User Logins

Post by Robster »

For anyone else who is figuring out why their log isn't appearing, for me the log appears in the folder as is defined in the LoggingDirectory parameter in the tm1s.cfg file, which was not the same folder as the tm1s.cfg file.
Post Reply