« Previous Next »

Thread: Identify the Correct Log

Last post 11-16-2009 2:31 PM by snarasingh. 11 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (12 items)

Sort Posts:

  • 10-26-2009, 1:37 PM

    • snarasingh
    • Not Ranked
    • Joined on 10-26-2009, 1:27 PM
    • NJ,US
    • Posts 8

    Identify the Correct Log

     Hi,

    we have multitenant architecture. same site is accessed my multiple clients.

    https://abc.domainname.com/Client1

    https://abc.domainname.com/Client2

    Each client will have their own databases. (ASP.NET Code is same)

    My Client2 is asking for iis log report. How i will differenciate the iis logs for both the clients???

    Sathyan 

     

     

     

     

  • 10-26-2009, 3:19 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,235
    • IIS MVPs

    Re: Idetify the Correct Log

    That depends on the software you use to generate the report, but you would basically filter for the client2 folder ...

  • 10-26-2009, 5:27 PM In reply to

    • snarasingh
    • Not Ranked
    • Joined on 10-26-2009, 1:27 PM
    • NJ,US
    • Posts 8

    Re: Idetify the Correct Log

    The problem is in idetifying the log...for both the clients log is storing in same location..as both the clients are using the same website

  • 10-27-2009, 6:22 AM In reply to

    Re: Idetify the Correct Log

    Hi,

    As this setup is using one web site the log file will contain entries for both virtual directories. The only way you can separate these out is to perform some manipulation on these log files before allowing your clients to see them. You could do this with Log Parser.

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 10-27-2009, 3:24 PM In reply to

    • snarasingh
    • Not Ranked
    • Joined on 10-26-2009, 1:27 PM
    • NJ,US
    • Posts 8

    Re: Idetify the Correct Log

    Yes Paul. In my case both the clients will use even the same virtual directory. (multitenant architecture)

    I'm trying hard how to seperate out the log for each client...

    is this parameter will be helpful s-username...but in my case it is not logging anything...

  • 10-28-2009, 4:23 AM In reply to

    Re: Idetify the Correct Log

    Hi,

    you can isolate the client2 by using  the "cs-uri-stem" filed. The "cs-uri-stem" begins with "/client’s name".

    The query looks like:
    logparser.exe "select cs-uri-stem into Output file path from Log file path where cs-uri-stem like '/client2%' "

    If you have any problem about Log Parser, you can post a question at Log Parser’s forum:
    http://forums.iis.net/default.aspx?GroupID=51

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • 10-28-2009, 10:29 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,235
    • IIS MVPs

    Re: Idetify the Correct Log

    snarasingh:
    In my case both the clients will use even the same virtual directory.

    Leo Tang - MSFT:
    you can isolate the client2 by using  the "cs-uri-stem" filed. The "cs-uri-stem" begins with "/client’s name".

    Because they are using the same virtual directory, this will not work.

    snarasingh:
    I'm trying hard how to seperate out the log for each client...

    You have quite a problem then.  The application should have been designed to take usage statistics into account.  There doesn't seem to be any way to identify from the IIS log what client content is being served.  Does the site use the same domain name for each client?

  • 10-28-2009, 11:57 AM In reply to

    Re: Identify the Correct Log

    You can still use Leo Tang's solution, you just need to use the host header cs-hostname instead. Or if it depends on the username logged in as, use cs-username or whatever. For prefixes or suffixes use "like" for example:

    cs-username like 'abc123%'

    catches all usernames beginning with abc123

     Logparser is the answer.

  • 11-02-2009, 4:21 PM In reply to

    • snarasingh
    • Not Ranked
    • Joined on 10-26-2009, 1:27 PM
    • NJ,US
    • Posts 8

    Re: Identify the Correct Log

    each client will have lot of users...by the way in my logs username is not loggin in..

    (eventhough it is checked in iis)

  • 11-03-2009, 6:41 AM In reply to

    Re: Identify the Correct Log

    You need to have something that able to differentiate the request for different client, else how would you know it belongs to which client?

    So glance through your settings and log files and find it, then use LP to parse it. if no diff, then manually do it line by line :(

    Cheers,
    Bernard Cheah
  • 11-03-2009, 9:58 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,235
    • IIS MVPs

    Re: Idetify the Correct Log

    tomkmvp:

    You have quite a problem then.  The application should have been designed to take usage statistics into account.  There doesn't seem to be any way to identify from the IIS log what client content is being served.  Does the site use the same domain name for each client?

  • 11-16-2009, 2:31 PM In reply to

    • snarasingh
    • Not Ranked
    • Joined on 10-26-2009, 1:27 PM
    • NJ,US
    • Posts 8

    Re: Idetify the Correct Log

    yes tom same url used by different client :)

    looks like i cannot differenciate the iis logs

Page 1 of 1 (12 items)
Microsoft Communities