In the ELK pipeline, I have Heartbeat pushing logs to Logstash and then to Elasticsearch. The heartbeat to logstash works fine and from logstash to elasticsearh have issues. I have done my best using the debug options in logstash but could not figure the issue. From the logs I am sure its a logstash get the URL from heartbeat and it is not pushing to ES.
I see the below lines in logstash logs, so LS has logs from Heartbeat.
_RUBY.start_input(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:325)_
_java.lang.Thread.run(java/lang/Thread.java:745)_
_[2017-05-22T14:25:17,518][DEBUG][logstash.pipeline] filter received {"event"=>{"tls_handshake_rtt"=>{"us"=>451771}, "scheme"=>"https", "ip"=>"162.24.10.21", "tcp_connect_rtt"=>{"us"=>220262}, "monitor"=>"http@https://myapplication-url.mydomain.com", "type"=>"http", "http_rtt"=>{"us"=>255383}, "url"=>"https://myapplication-url.mydomain.com", "tags"=>["beats_input_raw_event"], "duration"=>{"us"=>993180}, "rtt"=>{"us"=>927568}, "@timestamp"=>2017-05-22T12:23:20.834Z, "port"=>443, "resolve_rtt"=>{"us"=>65529}, "response"=>{"status"=>200}, "host"=>"myapplication-url.mydomain.com", "beat"=>{"hostname"=>"build-server.domain.mydomain.com", "name"=> "build-server.domain.mydomain.com", "version"=>"5.4.0"}, "@version"=>"1", "up"=>true}}_
_[2017-05-22T14:25:22,520][DEBUG][logstash.pipeline] output received {"event"=>{"tls_handshake_rtt"=>{"us"=>415247}, "scheme"=>"https", "ip"=>"162.24.10.21", "tcp_connect_rtt"=>{"us"=>211131}, "monitor"=>"http@https://myapplication-url.mydomain.com", "type"=>"http", "http_rtt"=>{"us"=>205383}, "url"=>"https://myapplication-url.mydomain.com", "tags"=>["beats_input_raw_event"], "duration"=>{"us"=>888011}, "rtt"=>{"us"=>831959}, "@timestamp"=>2017-05-22T12:25:20.834Z, "port"=>443, "resolve_rtt"=>{"us"=>55934}, "response"=>{"status"=>200}, "beat"=>{"hostname"=>"build-server.domain.mydomain.com", "name"=>"build-server.domain.mydomain.com", "version"=>"5.4.0"}, "host"=>"myapplication-url.mydomain.com", "@version"=>"1", "up"=>true}}_
It is not creating the heartbeat-logstash- ndex (as mentioned in output filter) and even this hearbeat index name is not logged anywhere in the log file. I have the below .yml file in the elk server.
input {
beats {
port => 5044
}
}
input {
heartbeat {
add_field => {
"role" => "logstash_shipper"
}
interval => "10"
type => "http"
}
}
## some filter statements to process other filebeat from other servers
output {
if [type] == "heartbeat" {
elasticsearch {
hosts => ["myelk-server.com:9200"]
manage_template => false
index => "heartbeat-%{+YYYY.MM.dd}"
}
} else
if [type] == "filebeat" {
elasticsearch {
hosts => ["myelk-server.com:9200"]
manage_template => false
index => "filebeat-logstash-%{+YYYY.MM.dd}"
}
}
}
Please help figure out what I am missing. However, other beat indexes like filebeat, metricbeat are created in the ES without any issues.