We want to display the list of users who are currently accessing a specific mashup. Is there is a service under the MASHUP entity or any other entity that returns the list of users accessing the mashup ?
My idea is to make use of the existing "GetActiveUsers" service listed under 'currentSessionInfo' resources entity, which returns the list of active users, and iterate over each user's current mashup (not sure if we have a service to get user's active mashup).
Is there a way to get the user's currently accessing mashup?
Or do we have a way to get the list of users who are accessing a specific mashup?
Kindly suggest your thoughts on this!!
Solved! Go to Solution.
I don't think there is a way to do this OOTB.
Easiest would to have a service on a mashup that fires on load and records the CurrentUser and the Mashup Name
I don't think there is a way to do this OOTB.
Easiest would to have a service on a mashup that fires on load and records the CurrentUser and the Mashup Name
Hi @Arjun9999.
If you're running 9.x, there were enhancements to the audit subsystem that will allow you to write your own extension for collecting this information. The suggestion Pai made may be the easiest option.
What is the need for this information? Are you troubleshooting a performance issue? Are you trying to validate the need for certain mashups?
Regards.
--Sharon
Hey Sharon,
We have a requirement for this for troubleshooting performance issues,
Actually, we want to check which mashups users use most and log the information.
Is there an OOTB service that gives a list of users with the Mashups they are accessing runtime?
Regards,
Pravin Pradhan
Hi,
If it is related to performance issue, I can recommend you to use UtilizationSubsystem. It shows the most used & time-consuming services used across your application.
This is not directly related to Mashup but more on service Utilization (knowing that at the end Mashup is calling services, it may help you)
Rgds,
Guillaume
Hello,
Which service is it in the subsystem that we can use for this?
Regards,
First enable it by checking "Enable Statistics" in Configuration tab.
Then you have a couple of service that you can call. Take a look on this page: https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Composer/System/Subsystems/utilizationsubsystem.html#
Guillaume
Hi Guillaume,
Thanks for the solution for performance,
But we are looking for a way to analyze and log the information of the pages/Mashups used by users more often.
is there anything that can check at runtime which are the users accessing which mashup?
Regards
Pravin
Hi,
Tomcat access logs should give you this kind of information:
[12/Dec/2022:10:00:08 +0000] "GET /Thingworx/Mashups/GLA.Mashup?_twsr=1&_=1670839208481 HTTP/1.1" 200 20545 4
If I remember well, to have user associated here you must increase logs level which is not something recommended in production (at least on a long time). Unfortunately I can't find back this information.
Regards,
This is possible but recommended against due to the fact it grows the log size too quickly and could cause issues that way.
That's why I recommended just a service that fires on mashup load to create your own custom tracking.