NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB (938 Views)
Reply
Advisor
Jason Conner
Posts: 35
Registered: ‎03-17-2008
Message 1 of 15 (938 Views)

NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

Currently, the only way I can log user info is by IP in Tomcat 6.0.32.  I need a way to log who logs in and out of Asset Manager web.

Trusted Contributor
GouravRane
Posts: 126
Registered: ‎11-24-2009
Message 2 of 15 (933 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

Make use of AmLoginSlot table. Whenever user logs into the AM, a connection slot is assigned to him. This info is maintained in AmLoginSlot table.
Esteemed Contributor
Deon Ferreira
Posts: 243
Registered: ‎08-23-2010
Message 3 of 15 (923 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

[ Edited ]

Hello Jason,

 

GouravRane's statement is correct around the amLoginSlot table but please bear in mind that the connection slots get destroyed as soon as the user logs out.

 

As you did not mention which version you are currently running on it is worth mentioning that the ability to track logins for the web client was only introduced in HP Asset Manager 9.30.

 

Regards,

Deon

Advisor
Jason Conner
Posts: 35
Registered: ‎03-17-2008
Message 4 of 15 (901 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

I am running Asset Manager 5.22 (latest build) and Tomcat 6.0.32.  So I just make the change in the AmLoginslot table and it will log it in the web?

Frequent Advisor
SGChandraKasan
Posts: 67
Registered: ‎08-10-2011
Message 5 of 15 (844 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

Probably you might need to create some triggers on the database side to monitor this amLoginSlot table to log the users log in and log out of the system.

Occasional Advisor
marco80
Posts: 9
Registered: ‎11-12-2010
Message 6 of 15 (754 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

[ Edited ]

I have the same problem.

 

Nobody have solved the question?

 

The amloginslot track the client access.

 

If i connect via web client the amlogin slot is withouth record.

 

Thanks a lot

Occasional Visitor
Phil Hutson
Posts: 2
Registered: ‎01-03-2007
Message 7 of 15 (727 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

Spoiler

Am setting this up at moment so not fully there yet, however, you can approach this in a couple of ways.

Firstly, using the amLoginSlot mechanism which will capture logins to the system. If you turn on the Track modifier against this table then the records of a user logging in will be recorded in the history records. The defaults to update the table are slow so that's probably why you haven't seen the updates and you will need to change the defaults in the web config.

The second mechanism is to use change the logging settings in the log4j.properties file (this is Tomcat based but should be the same if using other web servers). Unfortunately you have to set DEBUG mode so I made this as specific as possible:

log4j.appender.fileout.File = <changed to where I wanted log file to output>

log4j.appender.fileout.MaxFileSize = 5MB

log4j.logger.com.peregrine.ac.auth.ACWSLoginModule = DEBUG, fileout

log4j.additivity.com.peregrine.ac.auth.ACWSLoginModule = false

 

This second mechanism also allows you to capture failed logins if this is useful.

 

Both of these approaches capture logins but not logouts but it should be possible to monitor the amLoginSlot table to trigger when a user logs off.

 

Hope this helps, Phil

 

Occasional Advisor
marco80
Posts: 9
Registered: ‎11-12-2010
Message 8 of 15 (704 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

Hi Phil,

 

thanks a lot for reply.

 

I have some question for either solution :

 

 

Solution 1)How can i configure the track modifier in amloginslot table?Side asset manager o side Oracle?

What is the file and the parameter to increase side web to create record in amloginslot in web acces login?

 

Solution 2)I found many  log4j.properties.

 

C:\Tomcat55\webapps\AssetManager\WEB-INF\classes

C:\Tomcat55\webapps\AssetManagerWebService\WEB-INF\classes

 

For example the first path contain :

 

log4j.rootLogger = INFO, file
log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.File = c:\\AssetManager.log
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern = %d{ABSOLUTE} %5p - %c - %m%n

 

What is the most important and what i must modified?

I have open all the log4j. propierties and paramer are different.

 

Thanks a lot for the answer.

Frequent Advisor
Laurent Gittler
Posts: 69
Registered: ‎02-11-2011
Message 9 of 15 (681 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

With the AM web client, you can monitor the connections to the database,

On Oracle there is an easy solution, by a trigger on the Oracle database when a Users logs in or out of the AM schema If that is coupled with a trigger on amloginslot, then wyouwill have your entry/exit journal.

On MS SQL Server it will be a little more complex but it can be done.

 

But this will not monitor the Users login in and out of Asset Manager Web because there is a DBMS connection pool maintained in the web Service.

Connections can be reused.

Therefore a trigger on amloginslot will probably not capture real activity of the End Users on the Web.

 

 

Frequent Advisor
RobC_TR
Posts: 33
Registered: ‎06-15-2010
Message 10 of 15 (680 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

Can we clear on which version of AM web we're talking about, as has already been stated the slot usage is only getting tracked from AM 9.30 web.

Frequent Advisor
Laurent Gittler
Posts: 69
Registered: ‎02-11-2011
Message 11 of 15 (677 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

Yes you are right tracking starts with AM 9.30.
What I am saying is that even with AM 9.30 tracking Web Users through the DBMS side is not obvious anyway.
Frequent Advisor
RobC_TR
Posts: 33
Registered: ‎06-15-2010
Message 12 of 15 (674 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

HP have scripts for this as part of their SAM Best Practices, I think you can get these on Live Net now.

Occasional Advisor
marco80
Posts: 9
Registered: ‎11-12-2010
Message 13 of 15 (665 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

I known that from am 9.3 there is a track from access via web client.

My version instead is AM 5.20

 

I have read about SAM BEST practise in AM manual located in installation folder and there is a bit mention of it.

 

How can i get this scripts?

 

 

Frequent Advisor
RobC_TR
Posts: 33
Registered: ‎06-15-2010
Message 14 of 15 (656 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

I'm told they are in the SAM Best Practices from LiveNet:

 

https://hpln.hp.com/group/business-content-asset-manager

 

But the fact that 9.3 web will track slot usage where 5.2x doesn't is the problem point.

Occasional Advisor
Bob Negri
Posts: 10
Registered: ‎12-10-2007
Message 15 of 15 (610 Views)

Re: NEED A WAY TO LOG USERS WHO LOG IN AND OUT OF ASSET MANAGER WEB

We are using IIS 7, isapi_redirect, and Tomcat 6 with Asset Manager 5.22 for single sign-on.  With this setup it is possible to see the users accessing "AssetManager" web app.  The log is part of Tomcat 6 logging.  Unfortunately you would have to write a program or script to parse the logs in order to come up with a "clean" list of who accessed the web when.

 

Again, this setup only appears to work for single sign-on.  If you are logging into Asset Manager directly via the web, nothing is written to the Tomcat logs that you can use.

Bob Negri
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.