Service Creation Using NSSM

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

SERVICE CREATION USING NSSM

Guide for creating an Elasticsearch service and a Logstash service using NSSM (Non-Sucking Service
Manager) on Windows:

1. Download and install Elasticsearch:

• Visit the Elasticsearch downloads page (https://www.elastic.co/downloads/elasticsearch) and


download the Windows version.

• Extract the downloaded archive to a desired location on your machine.

2. Download and install Logstash:

• Visit the Logstash downloads page (https://www.elastic.co/downloads/logstash) and download


the Windows version.

• Extract the downloaded archive to a desired location on your machine.

3. Download NSSM:

• Go to the NSSM releases page on GitHub (https://github.com/nssm-s3/nssm/releases).

• Download the latest stable release of NSSM for Windows.

• Extract the downloaded archive to a convenient location.

4. Open Command Prompt as an administrator:

• Press Windows key + X, then select "Command Prompt (Admin)" from the menu.

5. Install Elasticsearch as a service using NSSM:

• In the Command Prompt, navigate to the location where you extracted NSSM.

• Run the following command to install Elasticsearch as a service:

Copy nssm.exe install Elasticsearch "C:\path\to\elasticsearch\bin\elasticsearch.bat"

• A dialog box will appear. Fill in the necessary information, such as service name, startup
directory, and arguments. Click "Install" to proceed.

• Elasticsearch will now be installed as a service.

6. Install Logstash as a service using NSSM:


• In the Command Prompt, navigate to the location where you extracted NSSM.

• Run the following command to install Logstash as a service:

nssm.exe install Logstash "C:\path\to\logstash\bin\logstash.bat" -f "C:\path\to\logstash\config\your-


logstash-config.conf"

Replace "your-logstash-config.conf" with the path to your Logstash configuration file.

• A dialog box will appear. Fill in the necessary information, such as service name, startup
directory, and arguments. Click "Install" to proceed.

• Logstash will now be installed as a service.

7. Start the Elasticsearch and Logstash services:

• Open the Services window by pressing Windows key + R, then type services.msc and press Enter.

• Scroll down to find the services "Elasticsearch" and "Logstash".

• Right-click on each service, select "Start", and wait for the services to start running.

You have now created Elasticsearch and Logstash services using NSSM. You can access Elasticsearch
through its REST API, and Logstash will be running and processing data according to your Logstash
configuration file. Make sure to adjust the paths in the commands according to your specific installation
directories.

You might also like