0

I have a remote rsyslog server up and running, and 10 servers are sending it's logs there as clients.

By default, they save it's logs in a directory with the same name as it's hostname. Let's say one of those servers has hostname client1, then in the main server a directory is created called /client1/ and it will be filled with the according log information for that client.

My boss wants that directory name to be hostname-IP. So if client1 has IP 192.192.192.192, then it should create a /client1-191.192.192.192/ directory on the main server with it's logs.

How/where I configure that?

Huge thanks in advance.

Warm regards.

1 Answer 1

0

The configuration file is on the server, /etc/rsyslog.conf or a file in /etc/rsyslog.d/ (or whatever other directory is included in /etc/rsyslog.conf). You'll need to restart rsyslogd for changes to take effect.

However, I don't think rsyslog makes the IP address available. You can take a look at this list of variables supported by rsyslog. If your clients are all on the same network and directly talking to the server, you might be able to use fromhost-ip but I've never tried that, myself.

Don't forget to back up your config files before making any changes ;) I've found rsyslog configuration to be a little finicky at times.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .