All Projects → pfelk → ansible

pfelk / ansible

Licence: Apache-2.0 license
Ansible playbook automation for pfelk

Projects that are alternatives of or similar to ansible

Search Guard Kibana Plugin
This plugin for Kibana adds session management and multi tenancy to a Search Guard secured cluster.
Stars: ✭ 107 (+365.22%)
Mutual labels:  elk, elk-stack
Synesis lite suricata
Suricata IDS/IPS log analytics using the Elastic Stack.
Stars: ✭ 167 (+626.09%)
Mutual labels:  elk, suricata
Elastic
Elastic Stack (6.2.4) 을 활용한 Dashboard 만들기 Project
Stars: ✭ 121 (+426.09%)
Mutual labels:  elk, elk-stack
Elastdocker
🐳 Elastic Stack (ELK) on Docker, with preconfigured Security, Tools, Self-Monitoring, and Prometheus Metrics. Up with a Single Command.
Stars: ✭ 883 (+3739.13%)
Mutual labels:  elk, elk-stack
ELK-Hunting
Threat Hunting with ELK Workshop (InfoSecWorld 2017)
Stars: ✭ 58 (+152.17%)
Mutual labels:  elk, elk-stack
Search Guard Docs
Official documentation for Search Guard, the Elasticsearch security suite
Stars: ✭ 92 (+300%)
Mutual labels:  elk, elk-stack
Search Guard Ssl
Elasticsearch SSL for free. Supports native Open SSL.
Stars: ✭ 159 (+591.3%)
Mutual labels:  elk, elk-stack
Helk
The Hunting ELK
Stars: ✭ 3,097 (+13365.22%)
Mutual labels:  elk, elk-stack
kiev
A set of tools to do distributed logging for Ruby web applications
Stars: ✭ 46 (+100%)
Mutual labels:  elk, elk-stack
lgrep
CLI for searching logstash and other elasticsearch based systems
Stars: ✭ 12 (-47.83%)
Mutual labels:  elk, elk-stack
Complete Guide To Elasticsearch
Contains all of the queries used within the Complete Guide to Elasticsearch course.
Stars: ✭ 829 (+3504.35%)
Mutual labels:  elk, elk-stack
rubban
Kibana Automatic Index Pattern Discovery and Other Elastic Stack Curating Tasks
Stars: ✭ 49 (+113.04%)
Mutual labels:  elk, elk-stack
Docker Compose Elasticsearch Kibana
Docker Compose for Elasticsearch and Kibana
Stars: ✭ 584 (+2439.13%)
Mutual labels:  elk, elk-stack
Punt
Punt is a tiny and lightweight daemon which helps ship logs to Elasticsearch.
Stars: ✭ 98 (+326.09%)
Mutual labels:  elk, elk-stack
Logagent Js
Extensible log shipper with input/output plugins, buffering, parsing, data masking, and small memory/CPU footprint
Stars: ✭ 333 (+1347.83%)
Mutual labels:  elk, elk-stack
Json Logging Python
Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as ELK, EFK, AWS Cloudwatch, GCP Stackdriver
Stars: ✭ 143 (+521.74%)
Mutual labels:  elk, elk-stack
docker-repo
A repository stores some dockerfiles or docker-compose files for quickly starting service or service cluster.
Stars: ✭ 26 (+13.04%)
Mutual labels:  elk, elk-stack
elastic-search-analyzer
基于elasticsearch,ik, 分词,全文搜索,使用demo
Stars: ✭ 41 (+78.26%)
Mutual labels:  elk, elk-stack
Mozdef
DEPRECATED - MozDef: Mozilla Enterprise Defense Platform
Stars: ✭ 2,164 (+9308.7%)
Mutual labels:  elk, elk-stack
pf-azure-sentinel
Parse pfSense/OPNSense logs using Logstash, GeoIP tag entities, add additional context to logs, then send to Azure Sentinel for analysis.
Stars: ✭ 24 (+4.35%)
Mutual labels:  maxmind, pfsense

ansible-pfelk Build Status

Ansible playbook automation for deploying pfelk

PyPI - Python Version

You can deploy using Ansible Galaxy Collection or with using the manual deploy process.

Note: When using the Ansible Galaxy Collection, you have to manually create a hosts file, and use the playbook provided in this repository.

Prerequisites

Prerequisites on control nodes

Currently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed. This includes linux distributions e.g. Red Hat, Debian, CentOS, macOS, any of the BSDs. Windows is not supported for the control node.

Take a look at the following link regarding further details on initial requirements: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html

Add Ansible apt repository and install the package for Ubuntu

$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible

Installation details for further distributions are available on the official site.

Create Ansible configuration (optional)

$ vi ~/.ansible.cfg

[defaults]
# disable key check if host is not initially in 'known_hosts'
host_key_checking = False

[ssh_connection]
# if True, make ansible use scp if the connection type is ssh (default is sftp)
scp_if_ssh = True

Prerequisites on managed nodes

To interact with your managed nodes, you will only need ssh. You don't have to install any other additonal agent on those hosts.

Tree of Ansible setup

ansible-pfelk/
├── deploy-stack.yml
├── group_vars
│   └── all.yml
├── hosts
└── roles
    ├── elasticsearch
    │   ├── files
    │   │   └── elasticsearch.yml
    │   ├── handlers
    │   │   └── main.yml
    │   └── tasks
    │       └── main.yml
    ├── kibana
    │   ├── files
    │   │   └── kibana.yml
    │   ├── handlers
    │   │   └── main.yml
    │   └── tasks
    │       └── main.yml
    └── logstash
        ├── files
        │   ├── pipelines.yml
        │   ├── 01-inputs.conf
        │   ├── 05-apps.conf
        │   ├── 20-interfaces.conf
        │   ├── 30-geoip.conf
        │   ├── 35-rules-desc.conf    
        │   ├── 36-ports-desc.conf 
        │   ├── 37-enhanced_user_agent.conf    
        │   ├── 38-enhanced_url.conf               
        │   ├── 45-cleanup.conf
        │   ├── 49-enhanced_private.conf
        │   ├── 50-outputs.conf
        │   ├── patterns
        │   │   ├── pfelk.grok
        │   │   └── openvpn.grok
        │   └── databases
        │       ├── private-hostnames.csv
        │       ├── rule-names.csv   
        │       └── service-names-port-numbers.csv    
        ├── handlers
        │   └── main.yml
        └── tasks
            └── main.yml

Deploy with Ansible Galaxy Collections

$ ansible-galaxy collection install fktkrt.ansible_pfelk

Manual Ansible playbook

Deploy playbook

Clone the repository

$ git clone https://github.com/pfelk/ansible-pfelk.git

Define the host you want to deploy the ELK stack to

Provide your target IP address in ansible-pfelk/hosts under elk, the ELK stack will be installed on this target.

Change current folder to ansible-pfelk/ then deploy the stack

$ cd ansible-pfelk/
$ ansible-playbook -i hosts --ask-become deploy-stack.yml

This will take care of the following tasks:

  • install elasticsearch
  • install kibana
  • install logstash
    • copy the .conf files, patterns and templates to their corresponding locations

Finish the configuration

You can follow the steps starting with the Firewall section at https://github.com/pfelk/pfelk/blob/master/install/configuration.md

Troubleshooting

Testing the playbook with dry-run

Include --check flag.

  • run ansible-playbook -i hosts --check deploy-stack.yml

Deploy to localhost

To deploy the playbook to your local machine you need the do following:

  • install and setup opensshon your machine
  • if you choose not to use ssh keys, install sshpass for auth purposes
  • under hosts define your IP as localhost
  • run the playbook with: ansible-playbook -i hosts --ask-pass --ask-become deploy-stack.yml

Enable verbose mode to debug problems

Include -vvvv flag.

  • run ansible-playbook -i hosts --ask-pass --ask-become -vvvv deploy-stack.yml
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].