Hi Mike,

if you bind the GELF HTTP input to 127.0.0.1, only processes on the same 
machine (or running in the Docker container) can access it.

Try binding the GELF HTTP input to the public IP address of the Docker 
container or 0.0.0.0.

Cheers,
Jochen

On Monday, 5 December 2016 20:57:54 UTC+1, Mike Norris wrote:
>
> Hi
>
> I am having some troubles technically with a GELF HTTP input
>
> I cannot POST a simple sample JSON message to my GELF endpoint, *I keep 
> getting "Unable to connect to the remote server"*
>
> Graylog has been installed as a Docker runtime container(s) on my Windows 
> 10 Surface laptop
>
> Starting Graylog up is simple, the Docker process worked first time, so I 
> have the following
>
> *a. Graylog V2.1.2 running*
>
> *b. I can login to the console via htttp:127.0.0.1:9000 
> <http://127.0.0.1:9000> as admin/admin*
>
> *c. I've created a basic GELF HTTP input in System ... Inputs*
>
> Type = GELF HTTP
> Bind address 127.0.0.1
> Port 12201
> removed any suggestion of TLS authentication, which is [optional] anyway
>
> This endpoint is running ok 
>
> So in theory I have a listening process on port 12201 waiting and ready 
> for GELF messages
>
> *d. I've tried POSTing simple requests as per the examples 
> in http://docs.graylog.org/en/2.1/pages/gelf.html 
> <http://docs.graylog.org/en/2.1/pages/gelf.html>*
>
> *e. My tool of choice for the client is Windows .NET and I've tried both 
> PowerShell and C# programs*
>
> All I think I have to do is deliver a correct json payload in a sim ple 
> HHTP request to the right endpoint for it to work
>
> *Example - PowerShell code*
>
> Set-ExecutionPolicy Unrestricted
> Get-ExecutionPolicy
>
> $resource = "http://localhost:12201/gelf";
>
> $body = '"{version": "1.1","host": "example.org","short_message": "A 
> short message that helps you identify what is going on","full_message": 
> "Backtrace here\n\nmore stuff","timestamp": 1385053862.3072,"level": 
> 1,"_user_id": 9001,"_some_info":"foo","_some_env_var":"bar"}'
>
> Invoke-WebRequest -Uri "http://127.0.0.1:12201/gelf"; -Method Post 
> -TransferEncoding "gzip" -ContentType "application/json; charset=UTF-8" 
> -Body $body
>
> I initailly wrote the PowerShell code without invoking gzip compression, 
> I've recently added that to no avail
>
> *f. I don't understand why the error I get is Unable to connect, as 
> Graylog is quite happy to serve pages on the same IP address on port 9000*
>
> The GELF INPUT is in a running state?
>
>
> Is this one of those examples where my input is wrong and the error 
> message is misleading?
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to graylog2+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/b7452a2a-4bee-404c-b371-92494c4987d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to