Hi,
I have created conf file with below details, but whenever I am searching in Kibana with type - auth_inbound_web I can see all logs with only 7 days. I need that for 30 days.
There are 2 Index namely -
logstash-test-prd0-30-auth-%{+YYYY.MM.dd} ----- which shows logs for 30 days
logstash-test-prd0-7-auth-%{+YYYY.MM.dd} ----- which shows logs for 7 days
[root@123]# cat output.conf
output {
if "test_inbound_web" in [type]
{
elasticsearch
{
hosts => ["testchesclientnode.anr53p.co.uk:9200"]
manage_template => false
index => "logstash-test-prd0-30-auth-%{+YYYY.MM.dd}"
}
}
else if "offduty" in [type] {
elasticsearch {
hosts => ["testchesclientnode.anr53p.co.uk:9200"]
manage_template => false
index => "logstash-test-prd0-7-test-%{+YYYY.MM.dd}"
}
}
}
=============================================
[root@123]# cat input.conf
input {
file {
path => "/logs/apache/test_secure_inbound.log"
type => "test_inbound_web"
tags => [ "test", "web", "apache", "access", "test", "test_secure_inbound", "apache_combined_timings", "prd0" ]
}
file {
path => "/logs/apache/offduty_test_secure_inbound.log"
type => "test_inbound_web"
tags => [ "test", "web", "apache", "access", "offduty","test", "test_secure_inbound", "apache_combined_timings", "prd0" ]
}
}
}
filter {
if "apache_combined_timings" in [tags] {
grok {
match => [ "message", "%{COMBINEDAPACHELOG:log} %{NUMBER:response_time} "%{DATA:api_transaction_id}" "%{DATA:apigw_authenticated_client}"" ]
}
}
}
Thanks,