« Previous Next »

Thread: How to exclude my own IP address from logs?

Last post 10-20-2009 1:53 PM by bobbyv. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 06-19-2009, 11:19 PM

    How to exclude my own IP address from logs?

    This may be the wrong forum section to ask this, but I hope someone here can help... 

    I look at my own sites quite a bit, when I am working on them.  This effects the logs.

    I would like to be able to somehow exclude my own IP address from the IIS logs, or remove the entries in some automated way.  I know some NT shell scripting; could the solution lie in that area?

    The IIS server has the same IP address as the machine I am accessing it from, through the internet (using NAT).  This problem is made a bit more complicated by the fact that I have a dynamic IP address that changes everytime I reboot the router.

    Any ideas?  Thanks.

  • 06-20-2009, 2:02 AM In reply to

    Re: How to exclude my own IP address from logs?

    Hi,

    There's no way to do this in IIS but you could use Log Parser to strip out unwanted IP addresses from result sets.

    http://forums.iis.net/default.aspx?GroupID=51

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 06-20-2009, 11:01 AM In reply to

    Re: How to exclude my own IP address from logs?

    I've been meaning to learn how to use Log Parser for quite a while, but I use another log viewing program to view IIS logs.

    Can Log Parser be used to actually process the log files, by stripping out the entries that I want removed, and then saving the processed log files to be viewed in another log viewing program?

    I have just thought, to make it easier for me to know which entries are mine (as I have a dynamic IP) I could access the sites by using an alternative domain name.

  • 06-20-2009, 2:06 PM In reply to

    Re: How to exclude my own IP address from logs?

    Synapse Syndrome:
    Can Log Parser be used to actually process the log files, by stripping out the entries that I want removed, and then saving the processed log files to be viewed in another log viewing program?
     

    Yes, you can do this with Log Parser - you could exclude specific IP addresses and direct the resultant output to a CSV file.

    Synapse Syndrome:
    I have just thought, to make it easier for me to know which entries are mine (as I have a dynamic IP) I could access the sites by using an alternative domain name.
     

    That would also work. In fact you could create a separate web site which points to the same web content and use a completely different host header.

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 07-02-2009, 3:58 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: How to exclude my own IP address from logs?

    Hi,

    Since you have a dynamic IP address and you are making the requests directly from your server, you can probably filter out the entries where the client ip address is equal to the server ip  address ('c-ip = s-ip').

    In AdvancedLogging, we've added a Filter feature post-beta that will 'ignore' requests that do not meet the criteria specified.  However, it currently only handles comparing field values to literal values so it will not help with your problem.  I will file a DCR to see if we can compare field values to other field values but it may not make it into this version.

    If you do the separate site idea you mentioned, you could create a filter to ignore your site name so that it will not even get serialized to your log file.

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 07-02-2009, 8:29 PM In reply to

    Re: How to exclude my own IP address from logs?

    Thanks for the information, but I think that Paul's idea to make a separate site that uses the same content is the ideal and easiest solution for me.

    As the log files will be in a different folder, I do not understand why they would still need to be filtered?

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

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: How to exclude my own IP address from logs?

    Hi synapse,

    I missed your question when you originally posted.  I was reviewing your post to let you know that we just released the RTW version of Advanced Logging in case you wanted to check it out.  Were you able to get your issue resolved by using a separate domain name?

    To answer your question, if your log files are in separate folders than filtering will be unnecessary.  However, if you are using global log files at the server level (ie all requests to all sites are rolled into a single file), then filtering could help you log only the requests that you care about.  You can take a look at the following walkthrough for more information:  http://learn.iis.net/page.aspx/692/advanced-logging-for-iis-70---log-filtering/

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-19-2009, 8:51 PM In reply to

    Re: How to exclude my own IP address from logs?

    Hi Bobby. I have been using a separate domain name and site to the same files, for my own access, but Advanced Logging looks interesting to try. Does it work with IIS 7.5? Thanks.
  • 10-20-2009, 1:53 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: How to exclude my own IP address from logs?

    Yes, it will work with IIS 7.5.

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (9 items)
Microsoft Communities