I tried above pattern but still failing.
input {
file {
type => "monitor1"
path => "/root/Documents/scripts/monitor/monitor.out"
start_position => "beginning"
}
}
filter {
if [type] == "monitor1" {
grok {
match => { "message" => "hostname:%{HOSTNAME:fqdn_unparsed}|ipaddress:%{IPV4:ip_addr}|status:%{GREEDYDATA:status}" }
}
}
}
output {
if [type] == "monitor1" {
elasticsearch {
hosts => ["1XX.XX.XXX.XX:9200"]
index => "montor1"
}
}
}
here is the error:
[2018-06-07T14:32:16,733][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
[2018-06-07T14:32:16,737][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
[2018-06-07T14:32:17,012][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.2.4"}
[2018-06-07T14:32:17,085][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-06-07T14:32:17,457][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2018-06-07T14:32:17,644][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://1XX.XXX.XX.XX:9200/]}}
[2018-06-07T14:32:17,645][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://1XX.XXX.XX.XX:9200/, :path=>"/"}
[2018-06-07T14:32:17,704][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://1XX.XXX.XX.XX:9200/"}
[2018-06-07T14:32:17,728][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2018-06-07T14:32:17,728][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the type
event field won't be used to determine the document _type {:es_version=>6}
[2018-06-07T14:32:17,729][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2018-06-07T14:32:17,731][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"default"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2018-06-07T14:32:17,736][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::Elasticsearch", :hosts=>["//1XX.XXX.XX.XX:9200"]}
[2018-06-07T14:32:17,888][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x4bacaefe@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:247 sleep>"}
[2018-06-07T14:32:17,921][INFO ][logstash.agent ] Pipelines running {:count=>1, :pipelines=>["main"]}