unexpected behavior

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

unexpected behavior

Postby joe.hidden » Mon Jan 19, 2009 3:24 pm

I have found an unexpected behavior (as long as i am concerned) and would like to know wether this is intended, or its a design flaw, or a bug, or just me beeing a noob. mybe someone knows a good workarround (a not-that-good has allready been found)

i use the imfile module, and i classify (sort) the received message by reading fromhost-ip to distinguish wether the origin is the local machine (127.0.0.1) or an external machine (some 10.x.x.x address).

unfortunately it seems that imfile-records do not fill this property (correctly). Is this really intended?

my workarround is using the hostname and matching it to the name of the machine (like "server1"). i dont like this workarround, becaues this makes the config-files unique to the machines. Up to now i managed to run general-purpose config files (all hosts own the same copy of the rsyslog.conf).

Any idea what to use for classification to be hostname-independend again?
joe.hidden
Avarage
 
Posts: 13
Joined: Thu Jan 15, 2009 10:35 am

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: unexpected behavior

Postby joe.hidden » Mon Jan 19, 2009 4:44 pm

alternately it would be helpfull if there where a property like $HOSTNAME (name of the host rsyslog is currently running, liek $minute and so) then i could again formulate a general-purpose if-statement
joe.hidden
Avarage
 
Posts: 13
Joined: Thu Jan 15, 2009 10:35 am

Re: unexpected behavior

Postby hkspvt » Mon Jan 19, 2009 7:25 pm

There is currently no way to make this work without using the hostname. There has been talk of adding some sort of a "localhost" macro, but for now the hostname is the way to go.

-HKS
hkspvt
Frequent Poster
 
Posts: 125
Joined: Thu Jun 26, 2008 6:31 pm

Re: unexpected behavior

Postby rgerhards » Tue Jan 20, 2009 11:48 am

There is a $myhostname property, which holds the name of the current host. As of the change log, this was introduced in 3.21.5, so it is not yet part of the current v3-stable. It was introduced for the reasons given in this thread. Seems to have been a good idea ;)
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: unexpected behavior

Postby hkspvt » Wed Jan 21, 2009 7:30 pm

I get distracted for a couple weeks, and....

-HKS
hkspvt
Frequent Poster
 
Posts: 125
Joined: Thu Jun 26, 2008 6:31 pm

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron