output { if [type] == "web_access_log" { if "_grokparsefailure" in [tags] { file { path => "/var/log/logstash/failed-web_access_log-%{+YYYY-MM-dd}" } } else { elasticsearch { hosts => ["localhost:9200"] index => "web_access_log-%{+YYYY.MM.dd}" } } } else if [type] == "web_error_log" { if "_grokparsefailure" in [tags] { file { path => "/var/log/logstash/failed-web_error_log-%{+YYYY-MM-dd}" } } else { elasticsearch { hosts => ["localhost:9200"] index => "web_error_log-%{+YYYY.MM.dd}" } } } else if [type] == "monolog" and [app_name] == "sigelar" { elasticsearch { hosts => ["localhost:9200"] index => "app_sigelar-%{+YYYY.MM.dd}" } } else if [type] == "syslog" { elasticsearch { hosts => ["localhost:9200"] index => "syslog-%{+YYYY.MM.dd}" } } else if [type] == "javalog" { elasticsearch { hosts => ["localhost:9200"] index => "javalog-%{+YYYY.MM.dd}" } } else { elasticsearch { hosts => ["localhost:9200"] index => "logstash-%{+YYYY.MM.dd}" } } }