Hello guys,
Im new with graylog.I’m building a graylog cluster with 3 nodes and I want to load balancer throught Nginx.Does anyone has a clear tutorial for this.
Thank you.
hi, what are you plan to balance? web? gelf ?
Thank for your rep.
I want to balance web.
server {
listen 80;
server_name examle.com;
location / { proxy_pass http://graylog-web-cluster; include /etc/nginx/proxy.conf; }
}
upstream graylog-web-cluster {
server 172.16.20.58:9200;
server 172.16.20.59:9200 backup;
}
Take a look at http://docs.graylog.org/en/2.2/pages/configuration/web_interface.html and http://docs.graylog.org/en/2.2/pages/configuration/load_balancers.html for relevant hints.
So in my each node graylog config file, Will i set “web_listen_uri = http://127.0.0.1:9200/” and “rest_listen_uri = http://127.0.0.1:9200/api/”, right ?
No, that means that Graylog will only be reachable on the local machine (127.0.0.1
== localhost
).
so, in that options, what should i set them?
Set both (rest_listen_uri
and web_listen_uri
) to the public IP addresses of the systems the respective Graylog instances are running on and configure you load balancer (nginx) to connect to all 3 of them.
Thanks very much for your support.
I did it.
Hi,
I installed a graylog cluster with three nodes. I also want to use nginx to load balancer, please share your nginx configuration to give me a help.
Thank you.
@Shelin First, please don’t hijack old topics but open a new one for your own issues.
Second, there’s a working nginx configuration in the Graylog documentation: http://docs.graylog.org/en/2.4/pages/configuration/web_interface.html#nginx