Trying to colour syslog-ng logs to ttyv7 but won't work after a reboot

Ashley Moran work at ashleymoran.me.uk
Thu Sep 15 08:59:23 PDT 2005


Alex Zbyslaw wrote:
> The requirements like BEFORE: SERVERS are not honoured by scripts in 
> /usr/local/etc/rc.d.  Try placing the script in /etc/rc.d calling it say 
> syslogng (i.e. without the .sh).

The BEFORE: doesn't bother me too much.  I don't care enormously if I 
lose a bit of logging.  I just put it in to match syslogd's setup.

> 
> man rc has more info, as would scanning back through the freebsd-rc 
> archives.  I believe that work to make scripts in /usr/local/etc/rc.d 
> work more like system scripts will appear sometime in 6.X, though full 
> integration is, I believe, not expected until 7.X.

I've only got a partial handle on the rc process.  A lot of it is black 
magic to me!  (aside: I thought Apple's launchd was pencilled in for at 
least FreeBSD 7 - which would render rc obsolete.)

> 
> Right now, your syslogng will be being started *after* lots of servers 
> that might expect to talk to it.  I assume you put syslogng_enable="YES" 
> into /etc/rc.conf? as well as syslogd_enable="NO".  (Or, it might work 
> just to change syslogd_program="/path/to/syslogngd" and not bother with 
> changing anything else).

Yes, syslog-ng is running fine (I'd already configured rc.conf like you 
say).  The problem is that it has a destination set up to pipe to the 
program ccze, and that pipe doesn't work unless I restart syslog-ng 
after boot time.

I've also tried moving the script into /etc/rc.d and renaming it 
syslogng.  After removing the devfs requirement it boots ok, but still 
requires a syslog-ng restart.

Perhaps the ttyv7 isn't properly created until after all the local rc 
scripts are run?  That's all I can think.


I can live with it how it is but it's frustrating that this little thing 
won't work!  I've become obsessed with my logs... I want every machine 
logged centrally, scanned, summarized and e-mailed on significant 
events.  And our network administrator wants them colour-coded and on 
display at the back of the office.  Perhaps the real problem isn't 
technical!

Thanks for your thoughts anyway.


Ashley


More information about the freebsd-questions mailing list