You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by James Corteciano <ja...@linux-source.org> on 2010/05/24 11:16:58 UTC

[users@httpd] httpd vhost centralized logging

Hi All,

I have running various web farms and I'm looking for better solution to
forward all vhost logs to the centralized syslog server.  How do you guys
keep vhost logs? I have done googling this kind of setup but there is no
result.

I'm thinking to use logger tool for every httpd services running but it's
not an ideal because it takes more resources in server. Let say there are 50
vhost in a server, then 100 logger apps will be running because 2 logger per
vhost (ErrorLog & CustomLog).

Thanks.

Regards,
James

Re: [users@httpd] httpd vhost centralized logging

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 24.05.10 11:45, Sandro Tosi wrote:
> We wanted to use syslog too, but it's very rigid (only 8 localX facility  
> for custom logs) so we discarded this solution.

you can use one local facility and zillions of program names to distinguish
between different logs.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
How does cat play with mouse? cat /dev/mouse

---------------------------------------------------------------------
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] httpd vhost centralized logging

Posted by Sheryl <gu...@his.com>.
Have you looked at syslog-ng?

Also might want to take a look at loganalysis.org.  They have some
resources which may (or may not) be of some help.

Sheryl

> We wanted to use syslog too, but it's very rigid (only 8 localX facility
> for custom logs) so we discarded this solution.
>
> We heard of scribe, the logs aggregator Facebook uses; it seems very
> flexible, and since FB is using it for his web servers, it's probably
> doing its job quite well. Sitll, we didn't have time to pilot it.
>
> Sandro
>


---------------------------------------------------------------------
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] httpd vhost centralized logging

Posted by Sandro Tosi <sa...@register.it>.
We wanted to use syslog too, but it's very rigid (only 8 localX facility 
for custom logs) so we discarded this solution.

We heard of scribe, the logs aggregator Facebook uses; it seems very 
flexible, and since FB is using it for his web servers, it's probably 
doing its job quite well. Sitll, we didn't have time to pilot it.

Sandro

On 05/24/2010 11:16 AM, James Corteciano wrote:
> Hi All,
>
> I have running various web farms and I'm looking for better solution 
> to forward all vhost logs to the centralized syslog server.  How do 
> you guys keep vhost logs? I have done googling this kind of setup but 
> there is no result.
>
> I'm thinking to use logger tool for every httpd services running but 
> it's not an ideal because it takes more resources in server. Let say 
> there are 50 vhost in a server, then 100 logger apps will be running 
> because 2 logger per vhost (ErrorLog & CustomLog).
>
> Thanks.
>
> Regards,
> James


---------------------------------------------------------------------
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] httpd vhost centralized logging

Posted by Jonas Eckerman <jo...@frukt.org>.
On 2010-06-05 18:11, James Corteciano wrote:

> Thanks for your response. What is your configuration for ErrorLog on all
> vhost?

For one single error log to wich all vhosts log, just place the ErrorLog 
directive in the server config scope (outside of any VirtualHost container).

For multiple error logs, one for each vhost, place ErrorLog directives 
in virtual host scope (inside VirtualHost containers).

The same goes for RewriteLog, ScriptLog, TransferLog and CustomLog.

Regards
/Jonas

-- 
Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda
http://www.fsdb.org/
http://www.frukt.org/
http://whatever.frukt.org/

---------------------------------------------------------------------
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] httpd vhost centralized logging

Posted by James Corteciano <ja...@linux-source.org>.
Hi Jonas,

Thanks for your response. What is your configuration for ErrorLog on all
vhost?

Regards,
James

On Fri, May 28, 2010 at 10:57 PM, Jonas Eckerman <jo...@frukt.org>wrote:

> On 2010-05-24 11:16, James Corteciano wrote:
>
>  I'm thinking to use logger tool for every httpd services running but
>> it's not an ideal because it takes more resources in server. Let say
>> there are 50 vhost in a server, then 100 logger apps will be running
>> because 2 logger per vhost (ErrorLog & CustomLog).
>>
>
> Separate loggers for each main HTTP server is not the same as separate
> loggers for each *virtual* host.
>
> Set up the logging in the main httpd config and you can have all vhosts use
> the same logger instance(s).
>
> I currently have this in a reverse proxy with 65 vhosts:
>
> CustomLog "|/usr/bin/logger -h 10.0.7.12 -t httpd -p local4.notice"
> vhostcombinedsyslog
> CustomLog "|/usr/bin/logger -h 10.0.7.12 -t httpd -p local4.notice"
> vhostnumsyslognc
>
> Those two lines results in a total of two logger apps running.
>
> Regards
> /Jonas
> --
> Jonas Eckerman
> Fruktträdet & Förbundet Sveriges Dövblinda
> http://www.fsdb.org/
> http://www.frukt.org/
> http://whatever.frukt.org/
>
>
> ---------------------------------------------------------------------
> 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] httpd vhost centralized logging

Posted by Jonas Eckerman <jo...@frukt.org>.
On 2010-05-24 11:16, James Corteciano wrote:

> I'm thinking to use logger tool for every httpd services running but
> it's not an ideal because it takes more resources in server. Let say
> there are 50 vhost in a server, then 100 logger apps will be running
> because 2 logger per vhost (ErrorLog & CustomLog).

Separate loggers for each main HTTP server is not the same as separate 
loggers for each *virtual* host.

Set up the logging in the main httpd config and you can have all vhosts 
use the same logger instance(s).

I currently have this in a reverse proxy with 65 vhosts:

CustomLog "|/usr/bin/logger -h 10.0.7.12 -t httpd -p local4.notice" 
vhostcombinedsyslog
CustomLog "|/usr/bin/logger -h 10.0.7.12 -t httpd -p local4.notice" 
vhostnumsyslognc

Those two lines results in a total of two logger apps running.

Regards
/Jonas
-- 
Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda
http://www.fsdb.org/
http://www.frukt.org/
http://whatever.frukt.org/

---------------------------------------------------------------------
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] httpd vhost centralized logging

Posted by Sakthi Esakiappan <sa...@mercuryminds.com>.
Don't get complicated through the various loggers available, simply use
logrotate the default linux application used to rotate the log files in
apache.

On 24 May 2010 14:46, James Corteciano <ja...@linux-source.org> wrote:

> Hi All,
>
> I have running various web farms and I'm looking for better solution to
> forward all vhost logs to the centralized syslog server.  How do you guys
> keep vhost logs? I have done googling this kind of setup but there is no
> result.
>
> I'm thinking to use logger tool for every httpd services running but it's
> not an ideal because it takes more resources in server. Let say there are 50
> vhost in a server, then 100 logger apps will be running because 2 logger per
> vhost (ErrorLog & CustomLog).
>
> Thanks.
>
> Regards,
> James
>



-- 
With Regards,
Sakthi Esakiappan.M
Server Administrator

MercuryMinds Technologies Pvt Ltd
www.mercuryminds.com "An E-Commerce mentor"
+91 44 45588587
sakthi.esakiappan@mercuryminds.com
www.mercuryminds.com

Disclaimer: This message is intended only for the use of the individual or
entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable law. If
you have received this message in error, you are hereby notified that we do
not consent to any reading, dissemination, distribution or copying of this
message. If you have received this communication in error, please notify the
sender immediately and destroy the transmitted information.