Is there a way to start logstash remotely?

Here's the use case:- Windows Environment.

logstash is on Server A and runs using a simple configuration file. The configuration file uses JDBC input plugin and elasticsearch output plugin. JDBC is connecting to SQL on Server B and pumping data into elastisearch on Server C. This configuration runs fine when logstash is started while logged into Server A.

However, the need is to start logstash from Server D. Wondering if it is possible and what recommendations are out there? Running logstash automatically on a schedule is not an option.

So far, I've tried the following.

  1. Created a batch file on Server A and called it from Server D using command line with shared/mapped UNC network path to Server A. It complained about not being able to find Java.

  2. Used SSIS execute process task with UNC path and working directory as the mapped drive. No errors but no work gets done.

Next I am thinking of trying PSExec or PS but wondering if anyone else has a better solution.

Thanks for your time and help!

Make sure Logstash runs as a Windows service. Those can be managed remotely.

Ok, will give it a try. Thank you.

That works.
For anyone else who may be interested, here's what worked. Although, I did not find any documentation about this on logstash reference portal.

  1. Used NSSM to install logstash as a windows service
  2. Pointed the logstash service to a configuration file
  3. Ensured right access level as needed
  4. Called the service remotely. Any of the following will work
  • sc start (when remote, from cmd or SSIS EPTask)

  • net start (locally)

  • nssm start (locally)

Thank you @magnusbaeck for pointing me in this direction.

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