• Stars
    star
    140
  • Rank 261,473 (Top 6 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Giving the Elastic Stack a try in Vagrant

Elastic Stack in a Box

This repository will install the Elastic Stack (Elasticsearch, Logstash, Kibana, and Beats) and optionally start a trial of commercial features. You can either start from scratch and configure everything with Vagrant and Ansible or you can download the final OVA image.

Features

  • Filebeat system, auditd, logstash, mongodb, nginx, osquery, and redis modules
  • Filebeat collecting Kibana JSON logs from /var/log/kibana/kibana.log
  • Auditbeat file_integrity module on /home/vagrant/ directory and auditd module
  • Heartbeat pinging nginx every 10s
  • Metricbeat system, docker, elasticsearch, kibana, logstash, mongodb, nginx and redis modules
  • Packetbeat sending its data via Redis + Logstash, monitoring flows, ICMP, DNS, HTTP (nginx and Kibana), Redis, and MongoDB (generate traffic with $ mongo /elastic-stack/mongodb.js)
  • The pattern for nginx is already prepared in /opt/logstash/patterns/ and you can collect /var/log/nginx/access.log with Filebeat and add a filter in Logstash with the pattern as an exercise

Vagrant and Ansible

Do a simple vagrant up by using Vagrant's Ansible provisioner. All you need is a working Vagrant installation (2.2.4+ but the latest version is always recommended), a provider (tested with the latest VirtualBox version), and 3GB of RAM.

With the Ansible playbooks in the /elastic-stack/ folder you can configure the whole system step by step. Just run them in the given order inside the Vagrant box:

> vagrant ssh
$ cd /elastic-stack/
$ ansible-playbook 1_configure-elasticsearch.yml
$ ansible-playbook 2_configure-kibana.yml
$ ansible-playbook 3_configure-logstash.yml
$ ansible-playbook 4_configure-auditbeat.yml
$ ansible-playbook 4_configure-filebeat.yml
$ ansible-playbook 4_configure-heartbeat.yml
$ ansible-playbook 4_configure-metricbeat.yml
$ ansible-playbook 4_configure-packetbeat.yml
$ ansible-playbook 5_configure-dashboards.yml

Or if you are in a hurry, run all playbooks with $ /elastic-stack/all.sh at once.

OVA Image

If Vagrant and Ansible sound too complicated, there is also the final result: An OVA image, which you can import directly into VirtualBox:

Kibana

Access Kibana at https://127.0.0.1:5601.

Test Data

You can use /opt/injector.jar to generate test data in the person index. To generate 100,000 documents in batches of 1,000 run the following command:

$ java -jar /opt/injector.jar 100000 1000

Logstash Demo

You can play around with a Logstash example by calling $ sudo /usr/share/logstash/bin/logstash --path.settings /etc/logstash -f /elastic-stack/raffle/raffle.conf (it can take some time) and you will find the result in the raffle index.

More Repositories

1

elastic-docker

Example setups for Elasticsearch, Kibana, Logstash, and Beats with docker-compose
Shell
149
star
2

microservice-monitoring

Monitor your Spring Boot application with the Elastic Stack all around
Java
127
star
3

java-logging

How to log from a Java application to the Elastic Stack
Shell
52
star
4

silverstripe-smtp

Using PHPMailer in SilverStripe
PHP
26
star
5

auditbeat-in-action

Demo for Elastic's Auditbeat and SIEM
HCL
24
star
6

morphia-demo

Morphia (MongoDB) demo project
Java
19
star
7

php-monitoring

Monitoring a PHP application with the Elastic Stack
HCL
16
star
8

integration-test-demo

Demoing multiple approaches of integration tests with Elasticsearch
Java
14
star
9

postgresql-monitoring

Monitor PostgreSQL with the Elastic Stack
Shell
12
star
10

silverstripe-book

SilverStripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide
JavaScript
12
star
11

mongouk2011

MongoUK2011 presentation on Morphia
Java
12
star
12

scale-elasticsearch

Demo for scalable Elasticsearch setups with Frozen Indices, Index Lifecycle Management, and Rollups
HCL
11
star
13

cms-security

CMS Security Track Record (2010 & 2011)
10
star
14

elastic-kubernetes-workshop

HCL
9
star
15

mod_security-log

Fighting SQL injections and insufficient logging
PHP
7
star
16

silverstripe-widget_facebookfeed

Fetching your latest status messages from Facebook
PHP
7
star
17

php-logging

How to log from a PHP application to the Elastic Stack
PHP
6
star
18

silverstripe-nginx

SilverStripe Vagrant box โ€” based on Ubuntu 14.04, nginx, and PHP-FPM
Shell
5
star
19

vagrant-ansible-aws

Vagrant box to configure AWS with Ansible
Shell
5
star
20

scale-elasticsearch-workshop

Workshop on how to scale Elasticsearch
HCL
4
star
21

elastic-cloud-domain-anonymous

Configure custom domains and anonymous Kibana access on Elastic Cloud
HCL
4
star
22

mongodb-monitoring

Monitor MongoDB with the Elastic Stack
Shell
3
star
23

ppc-test

Testing PPC on Ubuntu 14.04
Shell
2
star
24

CV

My CV in English and German
TeX
1
star
25

nosql-box

Vagrant file for NoSQL trainings
JavaScript
1
star
26

hazelcast-demo

Quick demo project for Hazelcast
Java
1
star
27

rest-training

Training on how to develop a REST application with Spring Boot
Shell
1
star