Operating System - HP-UX
1833896 Members
1916 Online
110063 Solutions
New Discussion

Re: How to redirect syslog.log messages to another host?

 
SOLVED
Go to solution
NMory
Respected Contributor

How to redirect syslog.log messages to another host?

I would like to know what is necessary to redirect all syslog messages from one to another.
I have entered *.* in syslog.conf redirected to @hostname, but still cannot log any messages in the remote host.
Also I have restarted the syslogd in the local server but still cannot see the syslog messages in remote host.

Any ideas?

TIA

NMory
11 REPLIES 11
NMory
Respected Contributor

Re: How to redirect syslog.log messages to another host?

Both servers have a connection. Already test it with a ping!!
Ivan Krastev
Honored Contributor
Solution

Re: How to redirect syslog.log messages to another host?

Check for spaces between *.* and @hostname. Only tab is allowed.

regards,
ivan
Court Campbell
Honored Contributor

Re: How to redirect syslog.log messages to another host?

You can't have

*.* @hostname

You need to specify a priority

*.emerg @hostname

or

*.debug @hostname
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Khashru
Valued Contributor

Re: How to redirect syslog.log messages to another host?

Add loghost entry in the /etc/hosts file

like

10.10.10.1 system1
10.10.10.2 system2 loghost

System1 is your machine and system2 is the machine you want to send log.

in /etc/syslog.conf add

*.info;mail.none @loghost

restart syslog daemon. Log should be going to the second server.
Sunny Jaisinghani
Trusted Contributor

Re: How to redirect syslog.log messages to another host?

hi

u need to configure two files.

/etc/syslog.conf

*.info;mail.none /var/adm/syslog/syslog.log
*.emerg @loghost
*.alert @loghost
*.info @loghost


/etc/hosts

hostname loghost
paolo barila
Valued Contributor

Re: How to redirect syslog.log messages to another host?

Hi,
check also if it's open UDP port 514 from host to destination host.
If the destination is a LINUX, syslogd needs to be started with "-r" option (/etc/sysconfig/syslog).

Pablo
share share share
NMory
Respected Contributor

Re: How to redirect syslog.log messages to another host?

Have tried everything guys, and I still have problems doing that...

Any other ideas?

Thanks,

NMory
Khashru
Valued Contributor

Re: How to redirect syslog.log messages to another host?

what is the problem. Any error message?
NMory
Respected Contributor

Re: How to redirect syslog.log messages to another host?

The problem is that it just don't log any messages of syslog from one server to another.

-Have restarted the syslogd in both servers
-Have used tabs instead of spaces in syslog.conf
-Have used the hostname and ipaddress in syslog.conf
-Have used entered the hostname and ipaddress in both /etc/hosts
-Have checked the ports and services in /etc/services.
-Have used *.* or other priorities.

Have tried all of that with no luck...Have you guys hadd this issue before? Don't kno w what else to check.

Thanks,

NM
Court Campbell
Honored Contributor

Re: How to redirect syslog.log messages to another host?

Try this:

/sbin/init.d/syslog stop
syslog -D -d -N

Can you post the output?
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
NMory
Respected Contributor

Re: How to redirect syslog.log messages to another host?

Thanks.