Hi,
In my ELK stack(5.6.1), I have configured my logstash to listen on both TCP(5000) and filebeat(5044) input.
Logs coming from filebeat is working fine but logs coming from TCP stops after some time without any error. I have checked the logstash logs in debug mode but couldn't find any error logs.
A python script is used to send logs to TCP port. When I ran the script, logstash logs shows the below debug log
[DEBUG][logstash.pipeline ] output received {"event"=>{"vid"=>"vutus", "@timestamp"=>2019-02-25T11:26:16.483Z, "port"=>49116, "@version"=>"1", "host"=>"x.x.x.x", "id"=>"1234567890", "message"=>"This is dummy message to test the logstash by vutus", "aws"=>{"invoked_function_arn"=>"lambda_funtion_arn", "memory_limit_in_mb"=>"1.1MB", "function_version"=>"1.0", "function_name"=>"lambda_funtion"}, "timestamp"=>"Fri Feb 22 06:57:08 2019"}}
After some time when the logstash stops processing the application logs, I ran the python script manually and I couldn't find any log in the logstash logs(like described above). But the python script is run successfully.
I have checked the memory and CPU but there are no issues.
The python script that I have used is
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send((json.dumps(log_entry)+ "\n").encode("UTF-8"))
#(log_entry is json formated log)
logstash configuration is
input {
tcp {
port => 5000
codec => json
}
beats{
port => 5044
}
}
Can anyone give me the right direction to solve this?