Re: How to log separate files or directories for centralizing SysLog server ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Tomas,

I can't use syslog-ng because it's not included in RHEL package in DVD and company policy not to use non-rpm. I can use rsyslog and found it's the same config to syslog. Can I apply that rules in rsyslog?

Thanks.

James

On Mon, Apr 12, 2010 at 3:57 PM, Tomas Ruprich <ruprich@xxxxxxxxxxxxxxx> wrote:
Hi James,
i think much better for syslog server usage is syslog-ng. It has bit
more difficult configuration for such a small network, but it brings
much more functionalities.

the simple ruleset for your needs could look like:

source s_sys { unix-stream("/dev/log"); internal(); };
source s_net { udp(); };

destination d_net { file("/var/log/network/$HOST/$YEAR.$MONTH.log"
owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)); };

log { source(s_net); destination(d_net); };
log { source(s_sys); destination(d_net); };

Hope it helps,
Tomas


Mon, Apr 12, 2010 ve 03:49:53PM +0800, James Corteciano napsal:
> Hi All,
>
> I have three server. server0 is centralized logging server, server1 and
> server2 are remote client servers. How can I properly configure the syslog
> in server0 to log the two servers in different separated files/directories.
> Example, server1 will be logged at /var/log/syslog/server1.log of server0
> and /var/log/syslog/server2.log for server2 as well. Is there need of little
> tweaking for syslog.conf ?
>
> Thanks.
>
> James

> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux