Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.33k stars 1.05k forks source link

Graylog Outputs with HTTP_Proxy #4444

Open sonnylaskar opened 6 years ago

sonnylaskar commented 6 years ago

Graylog Outputs not working via http_proxy_uri

Current Behavior

Hi,

We have a Server A where Graylog is installed with a Stream X And Another Server B where Graylog is installed with a Stream Y

Data is coming into X via a Beats inputs (http://ServerA:5044). A GELF HTTP input (http://ServerB:12201) is running on B.

Server A has Internet connectivity via an http_proxy (http://proxyserver:80). There are environment variables defined at the Shell level on A export http_proxy=http://proxyserver:80

We wrote a sample nodejs script which pushes a test message to http://ServerB:12201 and executed on Server A. We can see the data on the Server B. This confirms that the GELF endpoint is reachable via the Proxy Server and the ports are open.

Now, we have configured GELF OUTPUT for Stream X and push data to Server B at http://ServerB:12201 We then configured the below parameter in Server.conf and restarted Graylog

http_proxy_uri = http://proxyserver:80

But now, we see errors in the logs like

"unable to connect to ServerB"

Below is the configuration for the output:

Gelf ID: 5a473a67644f1814953f4d19
Type: org.graylog2.outputs.GelfOutput
connect_timeout: 1000
hostname: ServerB
max_inflight_sends: 512
port: 12201
protocol: TCP
queue_size: 512
reconnect_delay: 500
tcp_keep_alive: false
tcp_no_delay: false
tls_trust_cert_chain: <empty>
tls_verification_enabled: false

Please suggest what should we try to solve this.

Thanks

Steps to Reproduce (for bugs)

We tested the above steps in our environment.

Context

We want to push data from one Stream to another Stream on another Graylog instance.

Your Environment

sagarinpursue commented 6 years ago

I have written a plugin which supports HTTP output. Please find it here - https://marketplace.graylog.org/addons/f0e8970f-f1f2-4057-8afe-4befc10b313a