I have only 1 beat port configure.
Here is my FB conf files. -
- input_type: log
paths:
- D:\ServiceLogs\Zephyr**
- D:\Zephyr\inetpub\LogFiles**
tags: ["Zephyr"]
ignore_older: 1h
- input_type: log
paths:
- D:\ServiceLogs\Nightingale**
- D:\Nightingale\inetpub\LogFiles**
tags: ["IVR"]
ignore_older: 1h
- input_type: log
paths:
- D:\FCServices\inetpub\LogFiles**
tags: ["FCServices"]
ignore_older: 1h
- input_type: log
paths:
- D:\BreezeServices\inetpub\LogFiles**
tags: ["BreezeServices"]
ignore_older: 1h
Logstash 1 conf -
input
{
beats
{
port => 5044
}
}
filter
{
kv
{
value_split => ":"
remove_char_key => "[]"
remove_char_value => "[]"
include_keys => [ "method", "reasonPhrase", "requestUri", "content", "Payload", "id", "ClientID" ]
recursive => "true"
}
if "Zephyr" in [tags]
{
mutate
{
replace => { "type" => "Zephyr" }
}
}
if "IVR" in [tags]
{
mutate
{
replace => { "type" => "IVR" }
}
}
mutate
{
add_field => { "LogType" => "Services" }
remove_field => [ "tags", "offset", "input_type", "beat" ]
}
}
output
{
if [type] == "Zephyr"
{
elasticsearch
{
index => "zephyr-%{+YYYY.MM.dd}"
hosts => ["server:9200"]
}
}
if [type] == "IVR"
{
elasticsearch
{
index => "ivr-%{+YYYY.MM.dd}"
hosts => ["server:9200"]
}
}
#stdout
#{
# codec => rubydebug
#}
}
Logstash 2 conf -
input
{
beats
{
port => 5044
}
}
filter
{
#Ignore log comments
if [message] =~ "^#"
{
drop {}
}
grok
{
match =>
{
"message" => "%{TIMESTAMP_ISO8601:log_timestamp} %{IPORHOST:site} %{WORD:HttpVerb} %{URIPATH:RequestUri} %{NOTSPACE:querystring} %{NUMBER:Port} %{NOTSPACE:username} %{IPORHOST:clienthost} %{NOTSPACE:useragent} %{NOTSPACE:username} %{NUMBER:ResponseCode} %{NUMBER:subresponse} %{NUMBER:scstatus} %{NUMBER:time_taken}"
}
}
#Set the Event Timestamp from the log
date
{
match => [ "log_timestamp", "YYYY-MM-dd HH:mm:ss" ]
timezone => "Etc/UTC"
}
#Ignore all values for which GROK pattern is not set at this moment.
if "_grokparsefailure" in [tags]
{
drop {}
}
if "Zephyr" in [tags]
{
mutate
{
replace => { "type" => "Zephyr" }
}
}
if "IVR" in [tags]
{
mutate
{
replace => { "type" => "IVR" }
}
}
if "FCServices" in [tags]
{
mutate
{
replace => { "type" => "FCServices" }
}
}
if "BreezeServices" in [tags]
{
mutate
{
replace => { "type" => "BreezeServices" }
}
}
mutate
{
add_field => { "LogType" => "IIS" }
remove_field => [ "@version", "log_timestamp", "site", "querystring", "username", "clienthost", "useragent", "subresponse", "scstatus", "tags", "offset", "input_type", "beat" ]
}
}
output
{
if [type] == "Zephyr"
{
elasticsearch
{
index => "zephyr-%{+YYYY.MM.dd}"
hosts => ["server:9200"]
}
}
if [type] == "IVR"
{
elasticsearch
{
index => "ivr-%{+YYYY.MM.dd}"
hosts => ["server:9200"]
}
}
if [type] == "FCServices"
{
elasticsearch
{
index => "fcservices-%{+YYYY.MM.dd}"
hosts => ["server:9200"]
}
}
if [type] == "BreezeServices"
{
elasticsearch
{
index => "breezeservices-%{+YYYY.MM.dd}"
hosts => ["server:9200"]
}
}
#stdout
#{
# codec => rubydebug
#}
}