Operating System - HP-UX
1829507 Members
2261 Online
109991 Solutions
New Discussion

Re: [help]question about the syslogd[help]

 
SOLVED
Go to solution
zhangr_2
Advisor

[help]question about the syslogd[help]

I have two server named A-server and LOG-server.I install a tcp-wrapper on A-server and I want the tcp-wrapper log sent to LOG-server automatically.so I add an entry in A-server's /etc/syslog.conf:
local3.info @LOG-server
after restart the syslogd,It works.but the A-server sent the tcp-wrapper's log to LOG-server's /var/adm/syslog/syslog.log ,but I wanna use a specified log file to store the tcp-wrapper's log(for example /var/adm/syslog/A-server.tcpd.log)
so what should I do to implement it?thanks!

BTW:I already have a way to do this job but not good.
A-server in /etc/syslog.conf:
local3.info @LOG-server
LOG-server in /etc/syslog.conf:
local3.info /var/adm/syslog/A-server.tcpd.log
and it work.but the problem is The system only provide 8 facility (local0 to local7),and I have of course more the 8 server to sent logs.
4 REPLIES 4
Darren Prior
Honored Contributor
Solution

Re: [help]question about the syslogd[help]

Hi,

I think if you have more than 8 servers, but only can use local0-7 you'll have to put them all in one log, then use grep to pull the data out for the specific hostname that you want.

regards,

Darren.
Calm down. It's only ones and zeros...
Donny Jekels
Respected Contributor

Re: [help]question about the syslogd[help]

if server A is your log server.
do this in its /etc/syslog.conf file

*.info;mail.none;local3.none /var/adm/syslog/syslog.log

local3.info /var/adm/syslog/A-server.tcpd.log


on server B all you have to do in its /etc/syslog.conf is

*.info;mail.none @LOG-server

and if you want a local copy
then add
local3.info /var.....

/sbin/init.d/syslogd stop; /sbin/init.d/syslogd start

peace
Donny

"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: [help]question about the syslogd[help]

as for the mutliple servers you can write a perl script to tail -f the the log file
all day and sort by server name then route the logs to respective logs for each server.

or you can write a simple grep script to run once a day and chop up the log file and creat mutliple log files per server.

my 2 cents.
"Vision, is the art of seeing the invisible"
zhangr_2
Advisor

Re: [help]question about the syslogd[help]

thanks to all of you!
maybe the solution is just add a script to cut the log to multiple logs. thank you again! 8-)