Page 1 of 1

Tracking User Logins

Posted: Thu Aug 01, 2013 3:06 pm
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

Re: Tracking User Logins

Posted: Thu Aug 01, 2013 3:42 pm
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.

Re: Tracking User Logins

Posted: Thu Aug 01, 2013 4:38 pm
by LanceTylor
Thanks Kamil!

Re: Tracking User Logins

Posted: Fri Aug 02, 2013 8:40 am
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.

Re: Tracking User Logins

Posted: Fri Aug 02, 2013 9:18 am
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.

Re: Tracking User Logins

Posted: Wed Jul 26, 2017 5:24 pm
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:

Re: Tracking User Logins

Posted: Wed Jul 26, 2017 6:33 pm
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

Re: Tracking User Logins

Posted: Wed Jul 26, 2017 8:55 pm
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.

Re: Tracking User Logins

Posted: Thu Jul 27, 2017 1:23 am
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

Re: Tracking User Logins

Posted: Thu Aug 03, 2017 3:32 pm
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.

Re: Tracking User Logins

Posted: Thu Aug 03, 2017 3:40 pm
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.

Re: Tracking User Logins

Posted: Thu Aug 03, 2017 5:40 pm
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

Re: Tracking User Logins

Posted: Fri Aug 04, 2017 1:07 pm
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?

Re: Tracking User Logins

Posted: Fri Aug 04, 2017 2:12 pm
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'

Re: Tracking User Logins

Posted: Fri Aug 04, 2017 3:13 pm
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:

Re: Tracking User Logins

Posted: Fri Aug 04, 2017 3:25 pm
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.

Re: Tracking User Logins

Posted: Fri Aug 04, 2017 3:41 pm
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.

Re: Tracking User Logins

Posted: Tue Aug 22, 2017 9:13 am
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 :)

Re: Tracking User Logins

Posted: Wed Aug 23, 2017 1:25 pm
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.

Re: Tracking User Logins

Posted: Mon Aug 13, 2018 7:17 am
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.