How to Stop Logstash in Windows programatically


I am using Logstash 5.1.1.

Running logstash in windows command prompt using the command "logstash -f logstash.conf" and stopping it with CTRL+C .

But, I want to stop logstash programatically. Any suggestion on how to do this?

The GenerateConsoleCtrlEvent() Win32 API is equivalent to pressing Ctrl+C. I don't know if there's another way of shutting down Logstash gracefully (unless you're running it as a service).

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