All Projects → jimfilippou → elastic-stack

jimfilippou / elastic-stack

Licence: other
A complete documentation on how to install Elastic Stack on Ubuntu 16.04 Server ASAP 😎

Programming Languages

shell
77523 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to elastic-stack

docker-elk-stack
The ELK stack Docker containerization (Elasticsearch, Logstash and Kibana)
Stars: ✭ 20 (+66.67%)
Mutual labels:  logstash, filebeat, elk
Synesis lite suricata
Suricata IDS/IPS log analytics using the Elastic Stack.
Stars: ✭ 167 (+1291.67%)
Mutual labels:  logstash, filebeat, elk
ELK-Hunting
Threat Hunting with ELK Workshop (InfoSecWorld 2017)
Stars: ✭ 58 (+383.33%)
Mutual labels:  logstash, filebeat, elk
Elk
搭建ELK日志分析平台。
Stars: ✭ 688 (+5633.33%)
Mutual labels:  logstash, filebeat, elk
eslog tutorial
From Raw Logs to Real Insights - A tutorial for getting started with log analytics using Elastic Stack.
Stars: ✭ 28 (+133.33%)
Mutual labels:  elasticstack, logstash, elk
Elkstack
The config files and docker-compose.yml files of Dockerized ELK Stack
Stars: ✭ 96 (+700%)
Mutual labels:  logstash, filebeat, elk
Microservice Scaffold
基于Spring Cloud(Greenwich.SR2)搭建的微服务脚手架(适用于在线系统),已集成注册中心(Nacos Config)、配置中心(Nacos Discovery)、认证授权(Oauth 2 + JWT)、日志处理(ELK + Kafka)、限流熔断(AliBaba Sentinel)、应用指标监控(Prometheus + Grafana)、调用链监控(Pinpoint)、以及Spring Boot Admin。
Stars: ✭ 211 (+1658.33%)
Mutual labels:  logstash, elk
S1EM
This project is a SIEM with SIRP and Threat Intel, all in one.
Stars: ✭ 270 (+2150%)
Mutual labels:  logstash, filebeat
MegaDev
Bro IDS + ELK Stack to detect and block data exfiltration
Stars: ✭ 46 (+283.33%)
Mutual labels:  logstash, filebeat
Dsiem
Security event correlation engine for ELK stack
Stars: ✭ 255 (+2025%)
Mutual labels:  logstash, elk
Go Stash
go-stash is a high performance, free and open source server-side data processing pipeline that ingests data from Kafka, processes it, and then sends it to ElasticSearch.
Stars: ✭ 214 (+1683.33%)
Mutual labels:  logstash, elk
elastic-data-lake
Elastic Data Lake
Stars: ✭ 14 (+16.67%)
Mutual labels:  logstash, elk
Docker Elastic
Deploy Elastic stack in a Docker Swarm cluster. Ship application logs and metrics using beats & GELF plugin to Elasticsearch
Stars: ✭ 202 (+1583.33%)
Mutual labels:  logstash, filebeat
elk-dashboard-v5-docker
My production setup for the latest version of ELK stack running in a compose, displaying a basic -but powerfull- security and performance dashboard.
Stars: ✭ 25 (+108.33%)
Mutual labels:  logstash, elk
Elastiflow
Network flow analytics (Netflow, sFlow and IPFIX) with the Elastic Stack
Stars: ✭ 2,322 (+19250%)
Mutual labels:  logstash, elk
osint-combiner
Combining OSINT sources in Elastic Stack
Stars: ✭ 77 (+541.67%)
Mutual labels:  elasticstack, logstash
lgrep
CLI for searching logstash and other elasticsearch based systems
Stars: ✭ 12 (+0%)
Mutual labels:  logstash, elk
docker elk stack
Docker images to run an ELK stack
Stars: ✭ 24 (+100%)
Mutual labels:  logstash, elk
docker-elk-example
No description or website provided.
Stars: ✭ 58 (+383.33%)
Mutual labels:  elk, metricbeat
Elk Docker
Elasticsearch, Logstash, Kibana (ELK) Docker image
Stars: ✭ 1,973 (+16341.67%)
Mutual labels:  logstash, elk

alt text


Elastic Stack 5.0 Installation Guide

Software Version
Elasticsearch 5.0.0
Logstash 5.0.0
Kibana 5.0.0
Beats 5.0.0
X-Pack 5.0.0
Nginx 1.10.0
Java 1.8.0_111

Introduction and overview

The Elastic Stack we are going to set up is splited into 3 severs for the sake of simplicity. One server is for logstash, one for elastic search and one for kibana front-end, however you can put everything in a single vps but it's not recommended. We will be distributing mostly log data.

Setting up Elastic Search

First of all elasticsearch is powered with Java so lets get it to our server.

apt-get install openjdk-8-jre-headless

Elastic company maintains a .deb file to install elasticsearch on debian based systems so lets grab that .deb

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0.0.deb

Let's install it

dpkg -i elasticsearch-5.0.0.deb

Ok, before launching it let's see the configuration

nano /etc/elasticsearch/elasticsearch.yml

Hmm... seems like too much configuration stuff, but don't worry just uncomment and use these

cluster.name: "example"

node.name: "example"

network.host: "your elasticsearch server ip"

Now let's change max memmory mapping

sysctl -w vm.max_map_count = 262144

Start elasticsearch

service elasticsearch start

Ensure elasticsearch is working

curl http://127.0.0.1:9200

Make elasticsearch start on boot

systemctl enable elasticsearch

All set! continue to Logstash

Setting up Logstash

Logstash also needs java to power itself so get it

apt-get install openjdk-8-jre-headless

We will install logstash from public reposiories and not through .deb like we did last time, just follow along.

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list

Finally let's install it

apt-get update && apt-get install logstash

Logstash is downloaded and installed, but is it working correctly? Let's find out.

Go to this directory

cd /usr/share/logstash

And execute logstash programmatically

bin/logstash -e 'input { stdin { } } output { elasticsearch { hosts => ["ip-of-elasticsearch:9200"] } }'

What we did here? we started a cli-like software that lets us send messages over elasticsearch. Ok when you are able to type, type a random message and press enter, then exit with ctrl + C.

Soooo... we sent the message to elasticsearch, but is it there? lets see.

Open postman or a tool of your choice, we are going to send a GET request to elasticsearch server

http://ip-of-elasticsearch:9200/logstash-*/_search

You should now see the message you sent before

Lets now make logstash run on boot

systemctl enable logstash

And finally launch logstash

service logstash start

Continue to kibana setup

Setting up Kibana

Kibana is really easy to set up, and it doesn't require java at all!

Lets get the public repos, follow along

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list

Now install it

apt-get update && apt-get install kibana

Edit the configurations

nano /etc/kibana/kibana.yml

You only have to edit these:

server.host: "kibanaserver"

server.name: "hostname"

elasticsearch.url: "http://elasticsearchserver:9200"

Save the file and now we are ready to launch kibana

service kibana start

Setting up Nginx

Why do i need Nginx?

Well by default kibana is accessible to everyone, do you want that?

If you don't then configure nginx to ask for a password and then forward to actual kibana application

Use the default nginx configuration i provided

  • sudo apt-get install nginx
  • sudo -v
  • Get this command from http://pastebin.com/pTwwUpUQ (Markup Issue)
  • sudo nano /etc/nginx/sites-available/default
  • sudo nginx -t
  • sudo systemctl restart nginx
  • sudo ufw allow 'Nginx Full'

Setting up Filebeat

Filebeat does not require java, plus it's lightweight so don't worry about anything related to performance.

Like the old days add the apt repositories

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list

Now install it

apt-get update && apt-get install filebeat

Time to configure

nano /etc/filebeat/filebeat.yml

Use this configuration to start

paths:
  - /var/log/syslog
document_type: syslog

Then comment out output.elasticsearch line and the hosts line below it. We will be forwarding to logstash so uncomment output.logstash line and hosts line below it and replace with logstash ip

Now move to logstash server and open a console

Let's connfigure beats to filter the incoming data.

nano /etc/logstash/conf.d/beats.conf

There is no filter section to the current configuration so add this block!

filter {

  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog:timestamp"} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
    }
    date {
      match => [ "syslog_timestamp", "MMM  d HH:mm:ss", "MMM dd HH:mm:ss" ]
    }
  }

}

Restart logstash

service logstash stop

service logstash stop

Move back to filebeat server. Lets load the templates!

cd /etc/filebeat

curl -XPUT 'http://elasticsearchserver:9200/_template/filebeat' -d@/etc/filebeat/filebeat.template.json

Make it run on boot

systemctl enable filebeat

Start

service filebeat start

Now open your browser and navigate to kibana front-end

Go to management

alt text

Go to Index Patterns

alt text

Add a new index

alt text

Make sure Index name or pattern is filebeat-*

alt text

Go ahead, visualize your data 💩 !

X-Pack Setup

  • /etc/init.d/elasticsearch stop
  • cd /usr/share/elasticsearch/bin
  • ./elasticsearch-plugin install x-pack
  • /etc/init.d/elasticsearch start
  • cd /home/YOUR NAME/kibana-5.0.0-linux-x86_64/bin
  • ./kibana-plugin install x-pack
  • [To Import License Refer To X-Pack/license_import.sh]

Metricbeat Setup (Each Server) [Optional]

Feel free to open an issue if something isn't working, things change and i tested it a long time ago, but i will be maintaining it for a long time.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].