I have setup a UDP appender on a windows 7 machine with VSTS EnvLog.Config file. Also a ELK stack is installed on a centos 6.5 instance.
here's my /etc/logstash/conf.d/logstash.conf
input section
input {
udp {
port => 8081
type => "log4net"
}
}
#Filter
filter {
if [type] == "iis" {
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:log_timestamp} %{WORD:S-SiteName} %{NOTSPACE:S-ComputerName} %{IPORHOST:S-IP} %{WORD:CS-Method} %{URIPATH:CS-URI-Stem} (?:-|\"%{URIPATH:CS-URI-Query}\") %{NUMBER:S-Port} %{NOTSPACE:CS-Username} %{IPORHOST:C-IP} %{NOTSPACE:CS-Version} %{NOTSPACE:CS-UserAgent} %{NOTSPACE:CS-Cookie} %{NOTSPACE:CS-Referer} %{NOTSPACE:CS-Host} %{NUMBER:SC-Status} %{NUMBER:SC-SubStatus} %{NUMBER:SC-Win32-Status} %{NUMBER:SC-Bytes} %{NUMBER:CS-Bytes} %{NUMBER:Time-Taken}"}
}
}
}
#output
output {
elasticsearch {
host => localhost
port => "9200"
protocol => "http"
}
stdout {
codec => rubydebug
}
}
And here's my appender in EnvLog.Config
<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
<param name="RemoteAddress" value="ELK_SERVER_IP" />
<param name="RemotePort" value="8081" />
<layout type="log4net.Layout.PatternLayout, log4net">
<conversionPattern value="%date [%thread] %-5level - %property{log4net:HostName} - ApplicationName - %logger - %message%newline" />
</layout>
</appender>
A tcpdump of udp packets from VSTS to ELK server Port (8081) does show packets with INFO, DEBUG, etc messages. But im not able to figure if Logstash is able to read it and/or able to transfer them to ES and/or how to get kibana to display them from ES.
I am also not sure how to setup an index on Kibana or if it has to be noted in the appender + kibana needs to directed to that index. Kibana by default has logstash-* index which doesn't show any data. Also * in index too doesn't show anything. Please advise how to get Kibana see what UdpAppender is sending (through ES and Logstash). is anything wrong with my Logstash conf file??