Run logstash command on in the background on ec2

Hi Everyone,

I am currently trying to dump all my data from s3 to Elasticsearch.

I run this from ec2.

for that I have my logstash config file at /etc/logstash/conf.d/awses.conf

I run the command /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/awses.conf and any new files that land in ec2 are indexed in Elasticsearch
But as soon as the ssh window terminates this stops.
I want to keep this command running all the time in the background.

Any suggestion on how to achieve this?

Thank You,
Mohit Ruke

you'll want to run logstash as a service, which depends on which OS you're running.

See: https://www.elastic.co/guide/en/logstash/current/running-logstash.html

I am using Linux OS on AWS EC2

You'll need to figure out how that OS manages services (e.g., initd, systemd, upstart, etc)., and use the previously-linked guide to match that up with the required Logstash configuration.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.