About this list Date view Thread view Subject view Author view Attachment view

From: Liam Helmer (linuxlists_at_thevenue.org)
Date: Thu 30 Dec 2004 - 06:34:38 GMT


Further to this, here's the relevant bits from one of my syslog-ng
files. A word of note: the devices at /vservers/.devs/<name>/dev are
bind mounted into the vserver by another part of the startup... you
could change them safely to /vservsers/<name>/dev/log. This whole
configuration is generated with a script. You can ignore the mysql bits
if you're not doing this, naturally.

Cheers,
Liam

--------

log { source(vservers) ; destination(vservers);
        destination (console_9) ; };

source bind {unix-stream ("/vservers/.devs/bind/log") ;} ;
source ldap {unix-stream ("/vservers/.devs/ldap/log") ;} ;
source mysql {unix-stream ("/vservers/.devs/mysql/log") ;} ;
source pdns {unix-stream ("/vservers/.devs/pdns/log") ;} ;
source swivel {unix-stream ("/vservers/.devs/swivel/log") ;} ;
source test {unix-stream ("/vservers/.devs/test/log") ;} ;
source zmf {unix-stream ("/vservers/.devs/zmf/log") ;} ;

destination mysql_bind {
        pipe ("/var/run/mysqld/mysql_bind.pipe"
template("INSERT INTO logs
(host,vserver,facility,priority,level,tag,date,time,program,msg) VALUES
('$HOST','bind','$FACILITY','$PRIORITY','$LEVEL','$TAG','$YEAR-$MONTH-
$DAY','$HOUR:$MIN:$SEC','$PROGRAM','$MSG');\n") template-escape(yes));
} ;

log { source (bind); destination (mysql_bind) ; } ;

...
(repeated for each vserver)
...

log { source (bind);
        source (ldap);
        source (mysql);
        source (pdns);
        source (swivel);
        source (test);
        source (zmf);
        destination (vservers) ; destination (console_9) ; } ;

Cheers,
Liam

On Wed, 2004-12-29 at 01:58 +0100, Herbert Poetzl wrote:
> On Tue, Dec 28, 2004 at 07:19:50PM +0100, Oliver Welter wrote:
> > Hi Folks,
> >
> > question on syslog....
> >
> > What is the best way to use syslog inside the vServers - is it possible
> > to have one Logfile on the main maschine that collects all information ?
>
> yes, definitely
>
> > Whats the best way to do so ?
>
> separate sockets for each vserver, combined
> by one syslog daemon (syslog-ng) is probably
> the best choice here ...
>
> > Sharing a syslock socket ?
>
> not a good idea, neither security nor performance
> wise ...
>
> > Creating a syslog instance fpr each vServer and using
> > network-feature of syslog ?
>
> second best choice, almost as fast as sockets
> but might be more secure ...
>
> > I am running Gentoo with syslog-ng if this matters....
> >
> > THX
> >
> > Oliver
> > --
> > Diese Nachricht wurde digital unterschrieben
> > oliwel's public key: http://www.oliwel.de/oliwel.crt
> > Basiszertifikat: http://www.ldv.ei.tum.de/page72
>
> best,
> Herbert
>
> > _______________________________________________
> > Vserver mailing list
> > Vserver_at_list.linux-vserver.org
> > http://list.linux-vserver.org/mailman/listinfo/vserver
>
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
>

-- 
Liam Helmer <linuxlists_at_thevenue.org>

_______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 30 Dec 2004 - 06:35:14 GMT by hypermail 2.1.3