Operating System - Linux
1827806 Members
2275 Online
109969 Solutions
New Discussion

Logging syslog to remote server on Linux 2.4.20

 
Angie_1
Regular Advisor

Logging syslog to remote server on Linux 2.4.20

I need to route DEBUG syslog messages to another system. Can someone give me the syntax please to route DEBUG and anything else higher than this to another server?

Thanks,
Angie
5 REPLIES 5
Angie_1
Regular Advisor

Re: Logging syslog to remote server on Linux 2.4.20

Also, how do you turn on DEBUG mode? I should have asked that before!

Angie
Ivan Ferreira
Honored Contributor

Re: Logging syslog to remote server on Linux 2.4.20

You can use something like:

*.debug @remoteserver
*.debug @ip_of_remote_server

On the remote server, you need to enable the receiving of remote logs, normally, configured on /etc/sysconfig/syslog
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Angie_1
Regular Advisor

Re: Logging syslog to remote server on Linux 2.4.20

Thanks for writing Ivan.
I routed the /var/log/messages file to another server and it seems to be working. But nothing much is logging there. Is there something I can do to produce more logs to go over there? Also will /var/log/messages remain at 0 bytes since its being logged elsewhere?

Thanks,
Angie
Ivan Ferreira
Honored Contributor

Re: Logging syslog to remote server on Linux 2.4.20

After the changes, you need to restart both syslog servers. Ensure that the -r option is specified on the remote server to allow remote logging.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Stuart Browne
Honored Contributor

Re: Logging syslog to remote server on Linux 2.4.20

You should also make sure that you've opened UDP port 514 on the receiving server's firewall.

You can always test by running a command like:

logger -p user.debug This is a test message

It should go through to the logging server's debug catcher.
One long-haired git at your service...