SUMMARY:syslogd uses which loghost when running YP?

From: Ross A Macintyre (raz@cs.heriot-watt.ac.uk)
Date: Fri Sep 11 1992 - 13:54:34 CDT


Thanks to :
  Jim Mattson <mattson@cs.UCSD.EDU>
  birger@vest.sdata.no (Birger A. Wathne)
  Casper Dik <casper@fwi.uva.nl>
  Colin Macleod <cmacleod@mcs.dundee.ac.uk>
  trinkle@cs.purdue.edu
  mitch@cirrus.com (Mitch Wright)
  glenn%upstage%ups@fourx.Aus.Sun.COM (Glenn Satchell)
  Perry_Hutchison.Portland@xerox.com
  Mike Raffety <miker@sbcoc.com>
  "John D. Barlow" <John.D.Barlow@arp.anu.edu.au>
  rich_b@oldham.gpsemi.com (Richard Bogusz)
  montjoy@EDU.uc.ece.thor.cs.hw.ac.uk (Robert Montjoy)
  Claus Assmann <ca@idefix.informatik.uni-kiel.dbp.de>

My original question(not too well worded!):
>I've just started to use Yellow Pages and find that
> ifdef(`LOGHOST', /var/log/syslog, @loghost)
>in /etc/syslog.conf doesn't do as before YP.
>Now LOGHOST isn't defined and therefore it always tries to send to loghost
>which it can't find, as it isn't set to a machine name.
>
>Each server and its clients still has its own /etc/hosts file which contains
>the server and clients' entries only, ie
>127.0.0.1 localhost
>137.195.24.50 belinus loghost
>137.195.24.51 balder
>137.195.24.52 bhandia
>137.195.24.53 bes
>
>As I understand, this is only used at boot time, after which the YP maps are
>used.
>My YP hosts file doesn't assign loghost, which I assume is correct.
>The question is when does LOGHOST get defined and loghost set, so that syslogd
>will know to use /var/log/syslog or not?
>
>I know I can get round this by having syslog.conf use /var/log/syslog on
>the server, and @server_name on the clients, but I would rather /etc/syslog.conf
>were the same on all machines.
>
>Could someone enlighgten me?
>
>Ross

I should have made it clearer that I DID know about setting loghost in the
YP map, but I didn't want all our machines logging to one host.
Basically there are 3 options:
1. Log to one host - set loghost in YP to whatever.
2. Each machine to log to its own /var/log/syslog, by making localhost the
loghost in the master YP map.(I admit I didn't think of this)
3. Each server to act as the loghost.(not so easy)

What I had in mind when I originally posted this question, was to keep
things basically as they were, and have clients log to their respective
servers(option 3).
Perry_Hutchison's response suggested this:
*I think that the YP hosts file probably should assign loghost. If you
*want all machines to log to a single machine, you would define that
*machine as the loghost; if you want each machine to maintain its own
*log you can define loghost as localhost.
*
*I don't know of any really simple way to set up things like "all
*diskfull machines log locally, but diskless clients log to their
*respective servers" short of putting each server in its own separate
*YP domain wherein it is defined as the loghost. However, syslog.conf
*gets run through m4 and m4 is pretty powerful (although perhaps a bit
*obscure) so it may well be possible.
*
*One approach might be to move syslog.conf to (say) syslog.conf.input
*and run this through some sort of script to generate syslog.conf during
*startup, before syslogd gets started. Such a script could use logic
*similar to that near the middle of /etc/rc.local (where it decides
*whether to "synchronize time-of-day with the server") to discover
*whether the machine is diskless, and if so what is the name of its
*server. (I would not classify this as simple, however.)
*

I've decided on option 2 and each machine keeps its own logfile. Keep it
simple I say.
I don't see too much advantage in having clients log to their server(not simple,
so I won't attempt it:) and I've decided against option 1 as I don't want a
huge logfile and on first attempt the logfile(on a DECserver) didn't look
too pretty(tho' I'm sure it's ok on a Sun).

Thanks again to everybody for replying,

Ross Macintyre



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:50 CDT