3.1.2 OSE $SEQNUM Documentation Error?
I've been playing with Postgresql and 3.1.2 OSE on Gentoo and found a discrepancy when using the $SEQNUM macro and logging and recording on the same host. The 3.1 (& 3.2) docs state "The sequence number increases for every message, and is not lost even if syslog-ng is reloaded or restarted." However I noticed that each time syslog-ng is restarted the value returned by $SEQNUM starts at 1. A quick check of the source code (specifically templates.c and misc.h) shows no logic to keep state, the value is initialised to 1 on program start. Is this an OSE/PE difference, a documentation hiccup or (more likely!) have I got confused somewhere?
Mike Civil wrote:
I've been playing with Postgresql and 3.1.2 OSE on Gentoo and found a discrepancy when using the $SEQNUM macro and logging and recording on the same host.
The 3.1 (& 3.2) docs state "The sequence number increases for every message, and is not lost even if syslog-ng is reloaded or restarted." However I noticed that each time syslog-ng is restarted the value returned by $SEQNUM starts at 1.
A quick check of the source code (specifically templates.c and misc.h) shows no logic to keep state, the value is initialised to 1 on program start.
Is this an OSE/PE difference, a documentation hiccup or (more likely!) have I got confused somewhere?
Hi, Definitely not a difference between OSE/PE, either a bug in the docs or in syslog-ng. I'll look into it. Robert
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
Fekete Robert wrote:
Mike Civil wrote:
I've been playing with Postgresql and 3.1.2 OSE on Gentoo and found a discrepancy when using the $SEQNUM macro and logging and recording on the same host.
The 3.1 (& 3.2) docs state "The sequence number increases for every message, and is not lost even if syslog-ng is reloaded or restarted." However I noticed that each time syslog-ng is restarted the value returned by $SEQNUM starts at 1.
A quick check of the source code (specifically templates.c and misc.h) shows no logic to keep state, the value is initialised to 1 on program start.
Is this an OSE/PE difference, a documentation hiccup or (more likely!) have I got confused somewhere?
Hi,
Definitely not a difference between OSE/PE, either a bug in the docs or in syslog-ng. I'll look into it.
Robert
I've confirmed it with the developers, it's a syslog-ng bug. Robert
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
On 16/08/10 10:22, Fekete Robert wrote:
I've confirmed it with the developers, it's a syslog-ng bug.
Robert
Thanks for the bug confirmation Robert - best not to depend on the current behaviour then :)
On Mon, 2010-08-16 at 13:26 +0100, Mike Civil wrote:
On 16/08/10 10:22, Fekete Robert wrote:
I've confirmed it with the developers, it's a syslog-ng bug.
Robert
Thanks for the bug confirmation Robert - best not to depend on the current behaviour then :)
I wouldn't call it a bug, the RFC states: "The "sequenceId" parameter tracks the sequence in which the originator submits messages to the syslog transport for sending. It is an integer that MUST be set to 1 when the syslog function is ^^^^^^^^^^^^^^^^^^^^^^^^^^^ started and MUST be increased with every message up to a maximum ^^^^^^^ value of 2147483647. If that value is reached, the next message MUST be sent with a sequenceId of 1." This is not a semi-unique identifier, in fact I have some problems with how this identifier works. -- Bazsi
Balazs Scheidler wrote:
On Mon, 2010-08-16 at 13:26 +0100, Mike Civil wrote:
On 16/08/10 10:22, Fekete Robert wrote:
I've confirmed it with the developers, it's a syslog-ng bug.
Robert Thanks for the bug confirmation Robert - best not to depend on the current behaviour then :)
I wouldn't call it a bug, the RFC states:
"The "sequenceId" parameter tracks the sequence in which the originator submits messages to the syslog transport for sending. It is an integer that MUST be set to 1 when the syslog function is ^^^^^^^^^^^^^^^^^^^^^^^^^^^ started and MUST be increased with every message up to a maximum ^^^^^^^ value of 2147483647. If that value is reached, the next message MUST be sent with a sequenceId of 1."
This is not a semi-unique identifier, in fact I have some problems with how this identifier works.
I understand that, but IMHO if it is not persistent, it is of no real use. Robert
participants (3)
-
Balazs Scheidler
-
Fekete Robert
-
Mike Civil