rgerhards wrote:so do you want to log some messages ONLY to the remote hosts and others ONLY to the local host?
no.
there are several hosts sending the same info to /var/log/messages locally & to an external server. Lets say 10.0.0.4.
So the line in each
client config it would look like this...
- Code: Select all
*.info;mail.none;authpriv.*;cron.none /var/log/messages
& @@10.0.0.4;SendWithoutTimestampTemplate
Now, there is one
server (IP: 10.0.0.4) that is collecting these forwarded messages from the clients.
Upon collecting these messages it currently writes it to a single log. This is currently /var/log/messages locally on this
server.
What I am trying to do is, on the server, keep /var/log/messages only for local server messages and have all the incoming client data for everything that is not the local server written to a separate log. Let's say /logs/rsyslog.log.
That is what I am trying to achieve.
I need to know the way to differentaite between data that has been accepted through TCP and data that has occured locally. Then route the data that has come in via TCP to /logs/rsyslog.log.