I've been trying to set up logging for my .NET application using Logary > Logstash > ElasticSearch for nearly the entire day. I've tried every variation of the configuration I can think of and went through docs for hours to no avail.
What is wrong here?
var logary = LogaryFactory.New("Logary Specs", with => with
.Target<Logstash.Builder>("ls", conf => conf.Target
.Hostname("localhost")
.Port(1939)
.EventVersion(Logstash.EventVersion.One)
.Done())
.Target<Debugger.Builder>("debugger")
);
Here's the logstash.conf:
input {
stdin {}
tcp {
codec => json_lines { charset => "UTF-8" }
host => localhost
port => 1939
type => "app"
}
}
output {
stdout {}
elasticsearch {
host => localhost
protocol => "http"
}
}
I've tried without output.elasticsearch.protocol as with host => "0.0.0.0" like in docs, and every combination in between.
I have ES up on 9200 and Kibana loaded up and I can see logs show up through stdin/stdout but not from my application logs using Logary. It's also verified that the Logary debugger target works.
What's wrong with my pipeline here?
Logstash 1.4.2
ES 1.3.4
You need some components to debug it.
I wrote a sample program for you to use to debug it; this is the simplest possible thing that can work:
Here's its expected Debugger output (not console).
This code is here:
https://github.com/logary/logary/commit/0dca450677dc1ca691292d379a734c7051743c1c
You can do
Install-Package Intelliplan.Logary -Pre
and then copy over theLogary.dll
-dll file. Ensure you have the same output.If you can successfully connect to logstash as per the output above, you can verify that it's receiving the events or failing by printing to its log;