Download Elasticsearch, Kibana, and Logstash from the following links:
Unzip the downloaded files and create folders for each unzipped file.
Refer to the official guide for installing Elasticsearch on Windows:
Elasticsearch Installation Guide
-
Open Command Prompt (cmd).
-
Navigate to the directory where Elasticsearch is located and change directory to the
bin
folder. -
Edit the
elasticsearch.yml
file located in theconfig
folder and add the following line:action.auto_create_index: .monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*
-
Start Elasticsearch in Command Prompt by running:
elasticsearch.bat
-
Once you see the token, press
CTRL + C
to stop it, and copy and paste the token. -
Open the
elasticsearch.yml
file again and set the following to false:xpack.security.enabled: false
-
Start Elasticsearch again:
elasticsearch.bat
-
Add the following lines to
elasticsearch.yml
:xpack.security.http.ssl: enabled: false keystore.path: certs/http.p12 xpack.security.transport.ssl: enabled: false verification_mode: certificate keystore.path: certs/transport.p12 truststore.path: certs/transport.p12
-
Go to the
bin
directory in Command Prompt. -
Run the following commands and note down the passwords:
elasticsearch-reset-password -u elastic elasticsearch-reset-password -u kibana_system
-
Open the
kibana.yml
file. -
Uncomment and set the following lines:
server.port: 5601 server.host: "localhost" elasticsearch.hosts: ["http://localhost:9200"] elasticsearch.username: "kibana_system" elasticsearch.password: "Password" # Add the password for kibana_system
-
Save the file.
Create a Logstash configuration file (e.g., logstash.conf
) with the following content:
input {
stdin { }
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => ["http://localhost:9200"]
index => "test.logstash"
user => "elastic"
password => "YourElasticPassword" # Use the password for Elasticsearch noted down earlier
}
}
-
Run Elasticsearch, then open Chrome and navigate to http://localhost:9200 or https://localhost:9200.
-
Run Kibana by navigating to the
bin
directory in Command Prompt and running:kibana.bat
-
Open a new tab in Chrome and navigate to http://localhost:5601 or https://localhost:5601.
-
Create a file named
sample.conf
insideXXXXX\LogStash\logstash-8.2.3\config
. -
Add the following content to
sample.conf
:input { stdin { } } output { elasticsearch { hosts => ["http://localhost:9200"] index => "hellodb" } }
-
Open Command Prompt.
-
Navigate to the Logstash directory and change directory to
bin
. -
Run the following command:
logstash.bat -f .\config\sample.conf
This Markdown document is now structured and formatted for clarity, making it easier to follow the installation and configuration steps.