Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing mark message on TCP destination in case of mark_mode(host_idle) #545

Closed
mitzkia opened this issue Jul 6, 2015 · 1 comment
Closed
Assignees
Labels

Comments

@mitzkia
Copy link
Collaborator

mitzkia commented Jul 6, 2015

Using the following config syslog-ng OSE does not send "-- MARK --" messages to the destination.

@version: 3.7
options {
    mark_mode(host-idle);
    mark_freq(3);
};
source s_network_f5b2e69a6877439389c9e3286d1f37e9 {
    network(
      ip(127.0.0.1)
      log_iw_size(1)
      port(2001)
    );
};
destination d_network_db4d93c6b3664513a5282eef8f432d59 {
    network(
      "127.0.0.1"
      mark_mode(global)
      port(1212)
      throttle(1)
    );
};
log {
source(s_network_f5b2e69a6877439389c9e3286d1f37e9);
destination(d_network_db4d93c6b3664513a5282eef8f432d59);
flags(flow-control);
};

reproduction:
1, start listening on port 1212 (e.g): nc -lk 127.0.0.1 -p 1212
2, start syslog-ng using the above config
3, send messages to syslog-ng (e.g): bin/loggen --inet --rate=1 --size=200 --number=6 --interval=25 --active-connections=1 --quiet 127.0.0.1 2001
4, actual output:

<38>Jul 6 15:58:29 localhost prg00000[1234]: seq: 0000000000, thread: 0000, runid: 1436191109, stamp: 2015-07-06T15:58:29 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:58:30 localhost prg00000[1234]: seq: 0000000001, thread: 0000, runid: 1436191109, stamp: 2015-07-06T15:58:30 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:58:31 localhost prg00000[1234]: seq: 0000000002, thread: 0000, runid: 1436191109, stamp: 2015-07-06T15:58:31 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:58:32 localhost prg00000[1234]: seq: 0000000003, thread: 0000, runid: 1436191109, stamp: 2015-07-06T15:58:32 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:58:33 localhost prg00000[1234]: seq: 0000000004, thread: 0000, runid: 1436191109, stamp: 2015-07-06T15:58:33 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:58:34 localhost prg00000[1234]: seq: 0000000005, thread: 0000, runid: 1436191109, stamp: 2015-07-06T15:58:34 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD

expected output:
<38>Jul 6 15:57:58 localhost prg00000[1234]: seq: 0000000000, thread: 0000, runid: 1436191078, stamp: 2015-07-06T15:57:58 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:57:59 localhost prg00000[1234]: seq: 0000000001, thread: 0000, runid: 1436191078, stamp: 2015-07-06T15:57:59 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<46>Jul 6 15:57:59 tristram -- MARK --
<38>Jul 6 15:58:00 localhost prg00000[1234]: seq: 0000000002, thread: 0000, runid: 1436191078, stamp: 2015-07-06T15:58:00 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:58:01 localhost prg00000[1234]: seq: 0000000003, thread: 0000, runid: 1436191078, stamp: 2015-07-06T15:58:01 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<38>Jul 6 15:58:02 localhost prg00000[1234]: seq: 0000000004, thread: 0000, runid: 1436191078, stamp: 2015-07-06T15:58:02 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
<46>Jul 6 15:58:02 tristram -- MARK --

@deirf deirf added the ready label Jul 7, 2015
@deirf deirf self-assigned this Jul 13, 2015
@deirf
Copy link

deirf commented Jul 15, 2015

I know it. These functionality are different in your expectations and OSE. I read the documentations and comments in code and I think your expectations is not the same than there is in the documentation. Dst-idle and host-idle mark messages should be sent after first message incame because they are initialized in queue. The periodical mark mode is initialized in init function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants