Skip to main content
Participant
August 25, 2008
Question

Extracting user info from access log?

  • August 25, 2008
  • 1 reply
  • 242 views
I'm trying to extract user information from the access logs so that we can find out how many users accessed content during a specified time period. As far as I can tell, the only available field is IP (which will provide inaccurate information if a bunch of users are accessing content from behind a firewall). We considered another field (c-client-id) but this field unfortunately seems to change based on the content accessed by a client (browser) even if the new content is viewed in the same browser window. So if I view 2 videos from the same browser screen, 2 separate client ids will be logged. I would like to aggregate session information for a single user. Any help will be appreciated.

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    September 2, 2008
    The client ID can be used to identify a specific client only if all streams played by that client come through a single NetConnection. That client id will be unique throughout the lifetime of the connection, ie between the "connect" event in the access log, and the corresponding "disconnect" event.

    It is possible that your app uses multiple NetConnections for different streams that reside in the same SWF or browser window. If this is the case, you need to do a little more work to ensure that your application can associate these two connections as a single client session. One way to do this is to add a query string variable to your rtmp URL, which will be logged into the access log. This variable will represent the session id for your app. For example, your URL might be:

    rtmp://myfmsapp.com/myapp/_definst_/?sessionid=12345678

    How you determine the session id will be up to your app; if you already have a customer id for your app, you could use that to tie the session id number back to your application's customer database.

    Make sure that the access log is configured to log the query portion of the URL. These settings can be found in Logger.xml.