starting syslog with unreachable loghost
Hello I'm trying some stuff with syslog-ng 1.9.9. Is it possible to start the syslog-ng daemon when one of the remote hosts to which messages have to be send is not reachable? it seems not to be the case, but my config might be a little bit too thin... I have two destinations for my logs, one is on the local disk, the other is a host in the network. It seems that when the host is not available syslog-ng won't start, although it should better start logging to the local disk. What happens when the remote host connection gets broken while syslog-ng is running? thx for any pointers ... pieter
On Wed, 2006-03-22 at 13:53 +0100, luksedj luksedj wrote:
Hello
I'm trying some stuff with syslog-ng 1.9.9. Is it possible to start the syslog-ng daemon when one of the remote hosts to which messages have to be send is not reachable? it seems not to be the case, but my config might be a little bit too thin...
I have two destinations for my logs, one is on the local disk, the other is a host in the network. It seems that when the host is not available syslog-ng won't start, although it should better start logging to the local disk.
What happens when the remote host connection gets broken while syslog-ng is running?
Hm.. syslog-ng should behave exactly what you described, e.g. it should start up and continue connecting to the remote host. I've just checked it myself and it works. -- Bazsi
On Wed, 22 Mar 2006 16:14:36 +0100, Balazs Scheidler said:
On Wed, 2006-03-22 at 13:53 +0100, luksedj luksedj wrote:
I have two destinations for my logs, one is on the local disk, the other is a host in the network. It seems that when the host is not available syslog-ng won't start, although it should better start logging to the local disk.
What happens when the remote host connection gets broken while syslog-ng is running?
Hm.. syslog-ng should behave exactly what you described, e.g. it should start up and continue connecting to the remote host.
Does this act differently for TCP and UDP? If you're sending UDP, it's basically a fire-and-forget, but for TCP you have to get through the 3-packet handshake, which will die a miserable death if you start up syslog before the network interfaces are started..... (Alternatively, if it just gives up on the TCP and carries on, what's the recommended way of getting it to re-try the connect()? Hopefully it doesn't try to connect each time there's a new message - this could cause some massive delays and DoS if the network is down, resulting in a hung box....
On Wed, 2006-03-22 at 13:53 +0100, luksedj luksedj wrote:
Hello
I'm trying some stuff with syslog-ng 1.9.9. Is it possible to start the syslog-ng daemon when one of the remote hosts to which messages have to be send is not reachable? it seems not to be the case, but my config might be a little bit too thin...
I have two destinations for my logs, one is on the local disk, the other is a host in the network. It seems that when the host is not available syslog-ng won't start, although it should better start logging to the local disk.
What happens when the remote host connection gets broken while syslog-ng is running?
Hm.. syslog-ng should behave exactly what you described, e.g. it should start up and continue connecting to the remote host.
I've just checked it myself and it works.
And what if the remote host is not within a reachable network at the moment syslog-ng starts? pieter
On Wed, 2006-03-22 at 18:08 +0100, luksedj luksedj wrote:
On Wed, 2006-03-22 at 13:53 +0100, luksedj luksedj wrote:
Hm.. syslog-ng should behave exactly what you described, e.g. it should start up and continue connecting to the remote host.
I've just checked it myself and it works.
And what if the remote host is not within a reachable network at the moment syslog-ng starts?
It does not matter. Whatever error happens, it is logged and a timer is started to reconnect to the target host. The reconnect timeout is controlled by time_reopen() global option, IIRC it is 60seconds by default. And yes, it works for both UDP and TCP. -- Bazsi
participants (3)
-
Balazs Scheidler
-
luksedj luksedj
-
Valdis.Kletnieks@vt.edu