I'm trying to setup a GrayLog2 server and need to use the GELF HTTP input listener. I've made a small C# console program which sends test logs to the server. However it seems that only a couple of messages are actually parsed by gl2 and I cannot figure out why. E.g. the follwing program should create 5 logs pr. second. Gl2 maybe picks up 1 or 2 logs in total, no matter how long it runs. Has anyone succesfully used the GELF HTTP input and what am I missing here?
do
{
var client = new RestClient("http://10.8.0.39:12201");
var request = new RestRequest("gelf", Method.POST);
request.RequestFormat = DataFormat.Json;
var glog2 = new GLogEntry
{
host = "example.org",
short_message = "Short message...",
};
request.AddBody(glog2);
client.ExecuteAsync(request, r => { });
Thread.Sleep(200);
} while (1 == 1);