Filebeat - service should automatically starts

Hi,

I have the filebeat running on Freebsd and started the filebeat service via "service filebeat onestart" however I want to run filebeat service automatically in case service has stopped or if the server is rebooted, etc. Filebeat should run all the time. I know we can use "nohup" or cron script, just want to know if any other options.

Any suggestions could be appreciated !!

Hi,

This sounds more like a FreeBSD than Filebeat question and I'll start by admitting that I'm not very familiar with FreeBSD. However, it sounds like what you're looking for is https://www.freebsd.org/doc/handbook/configtuning-rcd.html, specifically the part about adding your service to /etc/rc.conf, so something like:

filebeat_enable="YES"

Hope that helps.

Shaunak

Many thanks, Shaunak, this will provide the reboot solution

[filebeat_enable="YES"

Any suggestion for filebeat service if service is stopped for any reason then service should start automatically.

I don't think this is a Filebeat-specific concern. I think you'd be better served by asking this question on a FreeBSD forum, since there might be idiomatic ways of doing this for FreeBSD that you'd want to apply to Filebeat but also any other services.

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