Setup ELK Stack On Amazon EC2 – Getting Started Guide

ELK is the most popular log aggreration and analysis stack. ELK stands for Elasticsearch, Logstash and Kibana.

Elasticsearch – It is a NoSQL, analytics and search engine.

Logstash – It is a log aggregation tool.

Kibana – It is a dashboarding tool.

ELK Stack On Amazon EC2

This guide will walk you through setting up a test ELK stack on amazon ec2 Ubuntu 14.04  instance. Follow the steps given below to have a working ELK stack.

Note: I assume that you have a ubuntu 14.04 server up and running in a public subnet.

1. Login and update the server.

Installting And Setting Up Logstash

1. Add logstash to the list.

2. Update the server.

3. Install logstash.

4. Update the server.

5. Start and check the status of logstash using the following commands.

Since it is a single host instaltion, we will direct all our logs to logstach using a configuration file.

6. create a file named /etc/logstash/conf.d/logstash-syslog.conf and copy the following contents on to the file.

7. Now, restart the logstash server to make necessary changes.

READ  How to Migrate WordPress Site to Digital Ocean Cloud Server

Installing And Configuring Kibana

1. Download the kibana source file.

2. Extract the source content

3. Create a kibana directory under /opt

4. Move the extracted folder contents to the /opt/kibana directory.

5. Create a service file for startup using the following commands.

6. Start the kibana dashboard service.

The above command would start kibana service on port 5601.

Now you can access the kibana dashboard on 5601 port with the public ip of your instance.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s