Does anyone know why this Windows Client side HTTP Gelf input would give me
the following error in the Graylog log?
*Error Message: java.lang.IllegalStateException: GELF message is too short.
Not even the type header would fit.*
static void Main(string[] args)
{
string url = "http://99.99.99.99:12201/gelf";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
httpWebRequest.ContentType = "text/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new
StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = "{\"version\":\"1.1\"," +
"\"host\":\"MyHost\"," +
"\"short_message\":\"A short message that
helps you identify what is going on\"," +
"\"facility\":\"test\"," +
"\"_foo\":\"bar\" }";
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
Thanks! Gary
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/graylog2/06b0e7ba-ef28-44ab-90de-69e3666ede1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.