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

My config doesn't balance data #317

Open
bobworker opened this issue Jun 30, 2021 · 1 comment
Open

My config doesn't balance data #317

bobworker opened this issue Jun 30, 2021 · 1 comment

Comments

@bobworker
Copy link

Hello,

I'm kind of knew with gobetween and I'm struggling to balance my data. I'm using gobetween with docker to send data to graylog's nodes.
When I'm looking at the logs I see that healthcheck is working :

[INFO ] (healthcheck/worker): Sending to scheduler: {{graylog-slave-2 5555} true}
[INFO ] (healthcheck/worker): Sending to scheduler: {{graylog-slave-2 5555} false}

The data should be sent to graylog-slave-1 5555 but If I don't restart the container, data won't balance. Can someone help me with this issue ?

You'll find bellow my configuration's file gobetween.toml.

[logging]
level = "info"
output = "stdout"

[profiler]
enabled = false

[metrics]
enabled = false

[api]
enabled = false

[servers.graylog_lb]
max_connections = 0
client_idle_timeout = "0"
backend_idle_timeout = "0"
backend_connection_timeout = "0"
bind = "0.0.0.0:5555"
protocol = "tls"
balance = "roundrobin"

  [servers.graylog_lb.tls]
  cert_path = "/etc/ca/ssl/cert.pem"
  key_path = "/etc/ca/ssl/key.pem"
  prefer_server_ciphers = false
  session_tickets = true

  [servers.graylog_lb.tcp]
  max_requests  = 1
  # Graylog does not send response to UDP packet
  max_responses = 0

  [servers.graylog_lb.discovery]
  kind = "static"
  failpolicy = "setempty"
  interval = "12s"
  timeout = "6s"
  static_list = [
    "graylog-slave-1:5555",
    "graylog-slave-2:5555",
    "graylog-master:5555"
  ]

  [servers.graylog_lb.healthcheck]
  kind = "exec"
  interval = "2s"
  timeout = "2s"
  fails = 1
  passes = 1

  exec_command = "/opt/script/healthcheck_graylog.sh"
  exec_expected_positive_output = "0"
  exec_expected_negative_output = "1"
@illarion
Copy link
Collaborator

It seems that problem is not in your config, but in your healthcheck_graylog.sh script, it reports that backend is dead.

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

No branches or pull requests

2 participants