My Oracle Support Banner

Is It Possible to Have the Entries Display the IP Address Instead of Hostname in Every Log Line in Rsyslog for Remote Host Log? (Doc ID 2538017.1)

Last updated on MARCH 04, 2025

Applies to:

Linux OS - Version Oracle Linux 7.0 and later
Linux x86-64

Goal

How to append %fromhost-ip% variable to every log line in rsyslog for remote host logs?

Default rsyslog showing entry like on server

Mar 14 10:35:43 <HOST> pgp/client[3367]: CLIENT-2126023: authenticated internal Encryption Desktop XXXX user M12663 from [XXX], how to display IP intead of hostname or display both.

Example both Hostname of nfs server is <

Apr 16 08:22:10 10.133.XXX.XXX <HOST> rpc.mountd[2473]: Version 1.2.3 starting
Apr 16 08:22:09 10.133.XXX.XXX <HOST> kernel: [92515.254124] nfsd: last server has exited, flushing export cache
Apr 16 08:22:10 10.133.XXX.XXX <HOST> kernel: [92515.441336] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Apr 16 08:22:10 10.133.XXX.XXX <HOST> kernel: [92515.441991] NFSD: starting 90-second grace period (net ffffffff81b8b040)

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.