[rsyslog] Interesting behaviour of random()

2024-02-06 Thread Mariusz Kruk via rsyslog
rsyslog-8.2302.0 A ruleset contains a piece of code supposed to chose somehting at random. At first it was like this: set $.set = "abcd"; set $.len = strlen($.set); set $.n = random($.len); set $.choice = substring($.set,$.len,1); But I was afraid that random() could not be perfectly uniform w

Re: [rsyslog] Rsyslog stop working when output destination (rabbitmq) is unavialable

2024-02-06 Thread Prasad Koya via rsyslog
Alex, excuse me for using this thread for posting my question. But my question is also on the same topic. I have configured rsyslogd (v8.2102.0) to forward syslogs to two remote servers, one using TCP protocol and second one using UDP. Besides forwarding, I also have a rule to log to a local file.

Re: [rsyslog] Rsyslog stop working when output destination (rabbitmq) is unavialable

2024-02-06 Thread David Lang via rsyslog
read the documents I posted above and they will explain most of what you are seeing. the reason it doesn't fail instantly is that the OS has a buffer for the TCP connection, and that buffer takes a little time to fill up. retrycount tells rsyslog how many times to retry each message before dr

Re: [rsyslog] Rsyslog stop working when output destination (rabbitmq) is unavialable

2024-02-06 Thread Alex via rsyslog
My solution is queue.type="LinkedList" queue.size="4096" queue.timeoutEnqueue="0" # timeout for reject new messages if queue is full queue.dequeuebatchSize="4000" ср, 7 февр. 2024 г. в 09:03, Prasad Koya via rsyslog < rsyslog@lists.adiscon.com>: > Alex, excuse me