Monitoring User Logins

Post Reply
chewza
Posts: 74
Joined: Tue Aug 17, 2010 11:51 am
OLAP Product: TM1
Version: 9.5
Excel Version: 7

Monitoring User Logins

Post by chewza » Wed Feb 12, 2020 10:39 am

Hi there

We are running Pa2, and I am trying to get a record of user logins.

Transaction logging is set for the }ClientProperties cube, but when I review the transaction log, nothing is there.

Any idea?

Regards
Chris

Drg
Posts: 139
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: Monitoring User Logins

Post by Drg » Wed Feb 12, 2020 10:59 am

Check }CubeProperties LOGGINING mustbe "YES"

Wim Gielis
MVP
Posts: 2339
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: Monitoring User Logins

Post by Wim Gielis » Wed Feb 12, 2020 12:13 pm

Did you do a Savedata, in order to get a timestamped text file (in the logging directory) containing the data changes since the last savedata or server restart ?
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

tomok
MVP
Posts: 2683
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Monitoring User Logins

Post by tomok » Wed Feb 12, 2020 1:44 pm

Putting something like this in your tm1slog.properties file will create a separate log file with login activity:

Code: Select all

log4j.logger.TM1.Login=DEBUG, LOCK
log4j.additivity.TM1.Login=false
log4j.appender.LOCK=org.apache.log4j.SharedMemoryAppender
log4j.appender.LOCK.File=lock.log
log4j.appender.LOCK.MaxFileSize=100 MB
log4j.appender.LOCK.MaxBackupIndex=20
log4j.appender.LOCK.TimeZone=GMT
This particular example writes all login activity to a file called lock.log.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

chewza
Posts: 74
Joined: Tue Aug 17, 2010 11:51 am
OLAP Product: TM1
Version: 9.5
Excel Version: 7

Re: Monitoring User Logins

Post by chewza » Wed Feb 12, 2020 1:50 pm

Hi there

Logging is set, and we do a SaveData every 5 minutes

Regards
Chris

tomok
MVP
Posts: 2683
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Monitoring User Logins

Post by tomok » Wed Feb 12, 2020 2:10 pm

I'm not sure what you are trying to capture with the }ClientProperties cube. There is no attribute in that cube that is going to show login activity. You are going to have to do that in a log like the example I gave you. You don't have to create a separate file, you can make it write to the server log, but you have to have the

log4j.logger.TM1.Login=DEBUG, LOCK
log4j.additivity.TM1.Login=false

lines in your tm1slogging.properties file.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

chewza
Posts: 74
Joined: Tue Aug 17, 2010 11:51 am
OLAP Product: TM1
Version: 9.5
Excel Version: 7

Re: Monitoring User Logins

Post by chewza » Wed Feb 12, 2020 2:29 pm

Hi Tom

Much appreciated, will give it a bash.

Regarding the }ClientProperties cube, I have seen a few posts where people claim that checking out a transaction log on this cube will give you login information.

Regards
Chris

tomok
MVP
Posts: 2683
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Monitoring User Logins

Post by tomok » Wed Feb 12, 2020 3:25 pm

Maybe it used to work in TM1 but it does not in PA. I am on PA and I double-checked again to make sure. There is nothing written to the transaction log for the }ClientProperties cube when a user logs in. The solution involving the tm1s-log.properties setting is the only sure-fire way to get what you want that I know of.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

lotsaram
MVP
Posts: 3348
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Monitoring User Logins

Post by lotsaram » Wed Feb 12, 2020 5:32 pm

Drg wrote:
Wed Feb 12, 2020 10:59 am
Check }CubeProperties LOGGINING mustbe "YES"
Almost, and in addition ClientPropertiesSyncInterval must be in tm1s.cfg
tomok wrote:
Wed Feb 12, 2020 3:25 pm
Maybe it used to work in TM1 but it does not in PA. I am on PA and I double-checked again to make sure. There is nothing written to the transaction log for the }ClientProperties cube when a user logs in.
It works and works fine. But for anything to be written against <}ClientProperties, userID, STATUS> ClientPropertiesSyncInterval must be set. It has been like this for a loooong time, like since 9.5 or 10.1

But the solution already suggested to write to a separate log file by adding parameters to tm1s-log.properties file is a much better solution.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.

Wim Gielis
MVP
Posts: 2339
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: Monitoring User Logins

Post by Wim Gielis » Wed Feb 12, 2020 8:57 pm

chewza wrote:
Wed Feb 12, 2020 1:50 pm
Hi there

Logging is set, and we do a SaveData every 5 minutes

Regards
Chris
Hmmm, every 5 minutes. Isn't that window rather short ?
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

kumesh
Posts: 5
Joined: Tue Aug 27, 2019 5:29 am
OLAP Product: IBM Cognos TM1
Version: IBM Planning Analytics 2.0
Excel Version: Professional 2016

Re: Monitoring User Logins

Post by kumesh » Thu Feb 13, 2020 7:51 am

Hi,

I cannot find the location for the tm1slog.properties file? Is it not in the same location as the tm1s config file?

Thanks,

Wim Gielis
MVP
Posts: 2339
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: Monitoring User Logins

Post by Wim Gielis » Thu Feb 13, 2020 8:15 am

Yes. If it’s not there, you should create it. There are examples in the documentation, for example.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

tomok
MVP
Posts: 2683
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Monitoring User Logins

Post by tomok » Thu Feb 13, 2020 11:04 am

kumesh wrote:
Thu Feb 13, 2020 7:51 am
Hi,

I cannot find the location for the tm1slog.properties file? Is it not in the same location as the tm1s config file?

Thanks,
It is actually called tm1s-log.properties.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

kumesh
Posts: 5
Joined: Tue Aug 27, 2019 5:29 am
OLAP Product: IBM Cognos TM1
Version: IBM Planning Analytics 2.0
Excel Version: Professional 2016

Re: Monitoring User Logins

Post by kumesh » Thu Feb 13, 2020 12:03 pm

tomok wrote:
Thu Feb 13, 2020 11:04 am
kumesh wrote:
Thu Feb 13, 2020 7:51 am
Hi,

I cannot find the location for the tm1slog.properties file? Is it not in the same location as the tm1s config file?

Thanks,
It is actually called tm1s-log.properties.
Yes - I cannot find this file either. Will I need to manually create a file and name it ''tm1s-log.properties''.

Thanks,

luizg2019
Posts: 16
Joined: Thu Sep 12, 2019 11:02 pm
OLAP Product: TM1 - PAW & Architect
Version: PA 2.0.7 - PAW 2.0.44
Excel Version: office 2016

Re: Monitoring User Logins

Post by luizg2019 » Thu Feb 13, 2020 12:12 pm

kumesh wrote:
Thu Feb 13, 2020 12:03 pm
Yes - I cannot find this file either. Will I need to manually create a file and name it ''tm1s-log.properties''.
Yes, that's what I had to do. Can confirm it worked fine.

kumesh
Posts: 5
Joined: Tue Aug 27, 2019 5:29 am
OLAP Product: IBM Cognos TM1
Version: IBM Planning Analytics 2.0
Excel Version: Professional 2016

Re: Monitoring User Logins

Post by kumesh » Thu Feb 13, 2020 12:31 pm

Thanks everyone, will give it a try now.

Wim Gielis
MVP
Posts: 2339
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: Monitoring User Logins

Post by Wim Gielis » Thu Feb 13, 2020 12:35 pm

kumesh wrote:
Thu Feb 13, 2020 12:03 pm
Will I need to manually create a file and name it ''tm1s-log.properties''.
Didn't you see my post above ?
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

tomok
MVP
Posts: 2683
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Monitoring User Logins

Post by tomok » Thu Feb 13, 2020 12:39 pm

While we're on the subject of logging, if you put this in your tm1s-log.properties file it will create a separate log called TI.log that will contain all messages you send from a TI:

Code: Select all

log4j.logger.TM1.TILogOutput=DEBUG, Debug_LogOutput
log4j.appender.Debug_LogOutput=org.apache.log4j.SharedMemoryAppender
log4j.additivity.TM1.TILogOutput=false
log4j.appender.Debug_LogOutput.File=TI.log
log4j.appender.Debug_LogOutput.MaxFileSize=100 MB
I use it to record all instances of a TI process running, who ran it, and what parameters they used. Here is an example:

Code: Select all

# ========================== WRITE PARAMS TO LOG ==================================
LOGOUTPUT('INFO', '---------------------------------------------------------------------------------');
LOGOUTPUT('INFO', GETPROCESSNAME());
LOGOUTPUT('INFO', 'Executed by ' | TM1USER());
LOGOUTPUT('INFO', 'pPeriod - ' | pPeriod);
LOGOUTPUT('INFO', 'pSourceVersion - ' | pSourceVersion);
LOGOUTPUT('INFO', 'pTargetVersion - ' | pTargetVersion);
In this example I will get an entry in the TI.log file that looks like this when the process is run:

Code: Select all

17380   [2032]   INFO   2020-02-04 20:23:00.658   TM1.TILogOutput   Copy Version
17380   [2032]   INFO   2020-02-04 20:23:00.658   TM1.TILogOutput   Executed by Planning Analytics/Test User
17380   [2032]   INFO   2020-02-04 20:23:00.658   TM1.TILogOutput   pPeriod - Jan-2020
17380   [2032]   INFO   2020-02-04 20:23:00.658   TM1.TILogOutput   pSourceVersion - Actual
17380   [2032]   INFO   2020-02-04 20:23:00.658   TM1.TILogOutput   pTargetVersion - Forecast
Having this information in a log is extremely helpful when trying to debug a process or finding out who did something.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

Post Reply