Operating System - HP-UX
1825561 Members
3150 Online
109681 Solutions
New Discussion

send logfiles to a remote host

 
SOLVED
Go to solution
tom quach_1
Super Advisor

send logfiles to a remote host

Dear,
OS: 11.31
i am configuring the syslogd to send log to a log server. It is working fine, but i want to direct the logging in the remote server to a different DIR not /var/adm/syslog/syslog.log
i have 2 client servers : TEST1 TEST1
i would like to configure so server TEST1 will send log to /var/adm/syslog/TEST1 and server TEST2 will send log to /var/adm/syslog/TEST2

from each client
in the file /etc/syslog.conf i have this line
but it is still logging to the default location.
*.info;mail.none /var/adm/syslog/itauxdev.log @sunusdev
and i also reverted like this
*.info;mail.none @sunusdev /var/adm/syslog/itauxdev.log
then restarted the daemon
#kill -HUP ID

but it is still log to the default location

please kindly assist.

Thanks,
Tom
5 REPLIES 5
Johnson Punniyalingam
Honored Contributor

Re: send logfiles to a remote host

(make sure use TAB via editing /adding the lines in syslog confile )

Example:-

*.info;mail.none /var/adm/syslog/syslog.log
*.info;mail.none @hostname (or IP#)


and stop and start the syslog.

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








Alternative Choice :-

scp -p /var/adm/syslog/syslog.log logserver:/logs/hostname
Problems are common to all, but attitude makes the difference
tom quach_1
Super Advisor

Re: send logfiles to a remote host


Thanks,

(make sure use TAB via editing /adding the lines in syslog confile )

Example:-

*.info;mail.none /var/adm/syslog/syslog.log
*.info;mail.none @hostname (or IP#)


and stop and start the syslog.

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


---i got this done, what i would like to do is the client still loges to it LOCAL DEFAULT LOCATION, BUT WHEN SENDING LOG TO THE REMOTE HOST S/B IN DIFFERENT LOCATION. RIGHT NOW IT SEND FILE TO REMOTE HOST IN DEFAULT LOCATION /var/adm/syslog/syslog.log
even i have a line likes this

*.info;mail.none /var/adm/syslog/syslog.log
*.info;mail.none @hostname /var/adm/syslog/test.log

Please advise.
Thanks,
Tom

Bill Hassell
Honored Contributor
Solution

Re: send logfiles to a remote host

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

This line determines where the logfile is located.

> *.info;mail.none @hostname /var/adm/syslog/test.log

There is no option to tell the remote syslog server where to store files. syslogd uses the standard syslog communication port to send messages. It is the destination system that determines where to store the logs. Just like the local system, the remote system follows the rules in the remote syslog.conf. There is no way to separate messages by the sending host. syslog can only separate messages by priority and facility.


Bill Hassell, sysadmin
Johnson Punniyalingam
Honored Contributor

Re: send logfiles to a remote host

As per >>Bill<< Hope you understand,

You need to have "Centralized Log Server" Some kind of application which capture information via port communication for your requirements.

mentioned to you earlier,

scp "would work fine for you requirements" bit effective only

Problems are common to all, but attitude makes the difference
tom quach_1
Super Advisor

Re: send logfiles to a remote host

Thank you Bill & johnson,

Best regards,
Tom