You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dan Trainor <da...@cavecreek.net> on 2003/11/17 14:38:08 UTC

[users@httpd] Ignoring certain IPs from logs

'Morning, all.

Anyone know of a way, if possible, to set Apache up to NOT LOG certain
IPs?  I've looked at LogFormat, and it doesn't look like that's the
key.  I'm playing around with some different webstat log parsers, and I
would like to ignore internal IPs so I can account for bandwidth
properly?

Thanks

-dant


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Ignoring certain IPs from logs

Posted by Rafael Faura <rf...@bassy.net>.
 
That's how i have it on my httpd.conf and it works :) (i changed the real
Ips for obvious reasons). Remember to put Ips inside "" and use \ and . to
separate IP parts ...

----------------------

SetEnvIf Remote_Addr "255\.255\.255\.255" dontlog
SetEnvIf Remote_Addr "8\.255\.255\.255" dontlog
SetEnvIf Remote_Addr "255\.213\.255\.255" dontlog
CustomLog logs/access.log common env=!dontlog


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Ignoring certain IPs from logs

Posted by Dan Trainor <da...@cavecreek.net>.
Alright, so I've got two options here.  Thanks, both of you.  I've never
used SetEnvIf before, I'll have to play with it.

Thanks
-dant


On Mon, 2003-11-17 at 07:04, Kyle Dent wrote:
> On Mon, 17 Nov 2003, Dan Trainor wrote:
> 
> > 'Morning, all.
> >
> > Anyone know of a way, if possible, to set Apache up to NOT LOG certain
> > IPs?  I've looked at LogFormat, and it doesn't look like that's the
> > key.  I'm playing around with some different webstat log parsers, and I
> > would like to ignore internal IPs so I can account for bandwidth
> > properly?
> 
> Generally you pre-process your log before passing it to your
> analyzer. grep -v, for example, will ignore lines in a file.
> 
> It wouldn't be a good idea to filter logging within Apache
> because complicated enough filtering could affect performance,
> and more importantly you might later want the data that you're
> filtering out. Log everything, then use tools to pull out the
> information you want to look at.
> 
> Kyle
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
-- 
Dan T.
Cavecreek Systems Administration Team
http://www.cavecreek.net

24 hour technical support
support@cavecreek.net
480.449.7750

------------------------------------------------------------
We welcome feedback on your customer service experience.
Please send a message to qc@cavecreek.net
------------------------------------------------------------



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Ignoring certain IPs from logs

Posted by Kyle Dent <kd...@seaglass.com>.
On Mon, 17 Nov 2003, Dan Trainor wrote:

> 'Morning, all.
>
> Anyone know of a way, if possible, to set Apache up to NOT LOG certain
> IPs?  I've looked at LogFormat, and it doesn't look like that's the
> key.  I'm playing around with some different webstat log parsers, and I
> would like to ignore internal IPs so I can account for bandwidth
> properly?

Generally you pre-process your log before passing it to your
analyzer. grep -v, for example, will ignore lines in a file.

It wouldn't be a good idea to filter logging within Apache
because complicated enough filtering could affect performance,
and more importantly you might later want the data that you're
filtering out. Log everything, then use tools to pull out the
information you want to look at.

Kyle


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org