Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start beats as a background process #984

Closed
huygn opened this issue Feb 17, 2016 · 8 comments
Closed

start beats as a background process #984

huygn opened this issue Feb 17, 2016 · 8 comments

Comments

@huygn
Copy link

huygn commented Feb 17, 2016

I know we can do something like filebeat -c filebeat.yml &, but I'd love to have an official run option.

@kkirsche
Copy link
Contributor

Please be aware that there are known runtime concerns with daemonizing within Golang golang/go#227 there are also additional concerns for daemonizing if a goroutine has occurred prior to the event.

@vi-nu
Copy link

vi-nu commented Feb 26, 2016

you can install it as a service:

https://www.elastic.co/guide/en/beats/libbeat/current/setup-repositories.html

then you can use #service filebeat start

@LakshithaH
Copy link

Installing filebeat as a service is a problem when you don't have sudo privileges. Better if we can have a demon start and stop like this

filebeat -c filebeat.yml start
filebeat -c filebeat.yml stop

@romberli
Copy link

i also wonder why there is no option like --daemon or -d, to start it as background process...

@tarun7631
Copy link

tarun7631 commented Jul 14, 2019

use screen -d -m ./filebeat -e -c filebeat.yml -d "publish" to run filebeat as a background process

@kkirsche
Copy link
Contributor

kkirsche commented Jul 14, 2019

Or the simpler nohup longrunningcmd &

Either way, neither screen or nohup are replacements for service management systems like systemd, etc.

@romain-chanu
Copy link
Contributor

If you run nohup filebeat & in a SSH session and the SSH session is closed, the filebeat process will be stopped. There is a signal handler implemented in the beats code. I believe this overwrites the signal handler set by nohup in the first place. Running filebeat as a service (sudo service filebeat start) would be an alternative.

@shengbinxu
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants