On Tuesday 29 January 2008, Porkchop wrote:
> On 29/01/08 17:54 -0500, Chris Knadle wrote:
> > The way I envision you doing essentially the same thing is having the
> > script read the log file via 'tail -f' (or something like it).
>
> Its not a single file, we have to rotate it daily (not hourly like I
> said before) so we can archive or delete logs by date. I may be able to
> add that rotation into the script, but it seems like an easy place to
> have a script failure. It may come to that.

   The script itself may not need to know about the rotation.  In the 
logrotate or logrotate.d/ setup you can probably add a postroate command to 
restart the script after the log rotation to keep the script from continuing 
to read the old file after a new one has been created.
   An installation of DenyHosts seems instead to just restart DenyHosts after 
a logrotate of its _own_ log rather than syslog's, so a postrotate command in 
the syslog logrotate setup may not be necessary.

> On 29/01/08 17:54 -0500, Chris Knadle wrote:
> >  Linux/Documentation/devices.txt says that the device is a syslog
> >  local socket.  I'm not sure why you'd want to use sockets in this
> >  situation; maybe you can explain what you were considering.
>
> If I can have my script open and listen to a socket and have syslog-ng
> deliver straight into it. I think it would work, but I'm not sure if
> syslog-ng would need to be restarted if the socket went away. I guess I
> just have to test it.
> -porkchop

   Yeah, I don't know if syslog-ng is going to hang if the socket drops, 
similar to the fifo problem you mentioned.  Hopefully it will just cause an 
error which will go to a different log and things would continue to work 
otherwise.  But other than that one concern it sounds like a plan.

   -- Chris

-- 

Chris Knadle
[EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Mid-Hudson Valley Linux Users Group                  http://mhvlug.org          
   
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug                           
Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium          
        
  Feb 6 - DBUS
  Mar 5 - Setting up a platform-independent home/small office network using 
Linux

Reply via email to