Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working with rsyslog through multiple hops. What I want is the following, I do not want the short hostname in the msg I only want the IP. So the server sending the msg I do not want it to add its short hostname to the message being sent I only want the IP of the server.

I'm using RHEL 5.5 with rsyslog

Any ideas?

share|improve this question
Somewhat related is… – kubanczyk Nov 20 '12 at 18:26

Add the below line in GLOBAL DIRECTIVES of rsyslog

$template LineTemplate,"%timereported% %fromhost-ip% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"

Then add below line just after the log file name


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.