Problem accurately listing real hostname in the message

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

Re: Problem accurately listing real hostname in the message

Postby vmix on Tue Jul 15, 2008 5:53 pm

"sddev05-vip" shows up in the logs. The hostname is "sddev05".

Dan
User avatar
vmix
Advanced
 
Posts: 32
Joined: Tue May 06, 2008 5:48 pm
Location: San Diego, CA

Professional Services Information

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

Re: Problem accurately listing real hostname in the message

Postby rgerhards on Wed Jul 16, 2008 10:58 am

It looks like "sddev05-vip" is what your system returns on gethostname(). I have written a quick verification tool. Please download, compile and run:

http://git.adiscon.com/?p=rsyslog.git;a ... ads/master

You can compile it simply with "cc gethostn.c" and then run "./a.out".

Let me know the outcome. If it is as I expect, a work-around may be to create a functionality to allow the config file to set the hostname (actually, you can do this with templates right now). But first let's look how it works...

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1662
Joined: Thu Feb 13, 2003 11:57 am

Re: Problem accurately listing real hostname in the message

Postby rgerhards on Wed Jul 16, 2008 11:47 am

ah, I overlooked one thing: you need to delete the #include "config.h" line. You do not have it if you compile outside of rsyslog's build system.
User avatar
rgerhards
Site Admin
 
Posts: 1662
Joined: Thu Feb 13, 2003 11:57 am

Re: Problem accurately listing real hostname in the message

Postby vmix on Wed Jul 16, 2008 5:49 pm

It returns the correct hostname.

Code: Select all
[dflores@sddev05 ~]$ ./a.out
hostname of this system is 'sddev05'.
User avatar
vmix
Advanced
 
Posts: 32
Joined: Tue May 06, 2008 5:48 pm
Location: San Diego, CA

Re: Problem accurately listing real hostname in the message

Postby rgerhards on Thu Jul 17, 2008 11:21 am

That's interesting. I probably need to create a specially-instrumented version to see where it screws up. I have to admit I did not expect this result ;)
User avatar
rgerhards
Site Admin
 
Posts: 1662
Joined: Thu Feb 13, 2003 11:57 am

Re: Problem accurately listing real hostname in the message

Postby vmix on Thu Jul 17, 2008 7:17 pm

This is also occurring on five other hosts, but the host I've been posting information about is the only one I can play around on.

Dan
User avatar
vmix
Advanced
 
Posts: 32
Joined: Tue May 06, 2008 5:48 pm
Location: San Diego, CA

Re: Problem accurately listing real hostname in the message

Postby rgerhards on Fri Jul 18, 2008 8:49 am

Yeah - I think there is enough evidence there is something incorrect in rsyslog. As I said, it should use the value from gethostname() but rsyslog's output and the output of the diag program is different, so there must be a problem. I don't think it is in the OS ;)
User avatar
rgerhards
Site Admin
 
Posts: 1662
Joined: Thu Feb 13, 2003 11:57 am

Re: Problem accurately listing real hostname in the message

Postby vmix on Wed Jul 23, 2008 10:02 pm

Please let me know if there's anything I can do to help resolve the issue.

Dan.
User avatar
vmix
Advanced
 
Posts: 32
Joined: Tue May 06, 2008 5:48 pm
Location: San Diego, CA

Re: Problem accurately listing real hostname in the message

Postby vmix on Tue Nov 04, 2008 12:50 am

Was this issue ever addressed? If so, which release? Thanks.

Dan
User avatar
vmix
Advanced
 
Posts: 32
Joined: Tue May 06, 2008 5:48 pm
Location: San Diego, CA

Re: Problem accurately listing real hostname in the message

Postby rgerhards on Tue Nov 04, 2008 8:21 am

I think it was, but all I can do now is refer you to the change log.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1662
Joined: Thu Feb 13, 2003 11:57 am

Re: Problem accurately listing real hostname in the message

Postby vmix on Tue Nov 04, 2008 7:55 pm

Thanks. I had looked, but there were no entries that clearly identified it as being addressed.

Dan
User avatar
vmix
Advanced
 
Posts: 32
Joined: Tue May 06, 2008 5:48 pm
Location: San Diego, CA

Re: Problem accurately listing real hostname in the message

Postby rgerhards on Wed Nov 05, 2008 9:09 am

I would appreciate if you could give the most recent version a try and report back. I most probably have same time to work on this around the end of the week, if it still is an issue.

Thanks,
Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1662
Joined: Thu Feb 13, 2003 11:57 am

Re: Problem accurately listing real hostname in the message

Postby vmix on Wed Nov 05, 2008 11:50 pm

Same issue with 3.20.0, which was released today.

Dan
User avatar
vmix
Advanced
 
Posts: 32
Joined: Tue May 06, 2008 5:48 pm
Location: San Diego, CA

Google Ads


Previous

Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron