Index is not getting generated . Please find the following configurations related to the issue. I am not getting any error in logstash logs.
Elasticsearch - 6.2.2
Logstash - 6.2.2
logstash.conf
input {
file
{
path =>["/log/X/Y/", "/log/P/Q/"]
tags => ["Test"]
}
}
filter {
if "Test" in [tags]
{
grok {
match => { "message" => "(%{TIMESTAMP_ISO8601:timestamp}),%{NUMBER:milisecond} - iims.services.PolicyServiceHandler - INFO - UserCode %{DATA:UserId} | PolicyNumber %{NUMBER:PolicyNumber} | Premium %{NUMBER:Premium} | productcode %{WORD:ProductCode}" }
remove_field => [ "message" , "milisecond" ]
}
date {
match => [ "timestamp" , "yyyy-MM-dd HH:mm:ss" ]
timezone => "Asia/Kolkata"
}
mutate {
convert => { "Premium" => "integer" }
}
translate
{
field => "UserId"
destination => "User"
dictionary_path => "/etc/logstash/userdictionary.yml"
fallback => "Others"
exact => "true"
regex => "true"
}
}
}
output {
if "Test" in [tags]
{
elasticsearch {
hosts => [ "elkmonpt1.newindia.co.in:9200" ]
index => "niacorepremium-%{+YYYY.MM.dd}"
user => logxxxx
password => TYYYY
}
}
}
Logs I am trying to parse is :
2019-02-21 17:04:19,567 - iifs.services.PolicyServiceHandler - INFO - UserCode AG_MNJSPQ | PolicyNumber 45210331180100010129 | Premium 1361 | productcode XY
Thanks for the help.