Automatically start Logstash when Windows reboot

I am using Windows OS as a source in which Logstash is installed and run Logstash using the following command on PowerShell:
logstash -f logstash.conf

Now as I am working in an industrial setting, manually running this command after every reboot is not feasible and I want to configure it in such a way that whenever system reboots, Logstash runs automatically.

Please suggest me a way to do this.

Run it as a service.

@Badger It surely works, but if we want to monitor its status after running it as a service, what is the best way to do that?

We can see by Get-Service -Name logstash but any other way to see if Logstash is running by using Logs etc?

If you have x-pack you can use that to monitor logstash.

1 Like

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