All Projects β†’ geerlingguy β†’ Ansible Role Logstash

geerlingguy / Ansible Role Logstash

Licence: mit
Ansible Role - Logstash

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Ansible Role Logstash

Ansible Elk
πŸ“Š Ansible playbook for setting up an ELK/EFK stack and clients.
Stars: ✭ 284 (+108.82%)
Mutual labels:  ansible, logstash, elk
ansible-role-kibana
Ansible Role - Kibana
Stars: ✭ 104 (-23.53%)
Mutual labels:  logstash, elk, role
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 (+5.15%)
Mutual labels:  logstash, elk, logging
Justlog
JustLog brings logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support for logz.io available.
Stars: ✭ 439 (+222.79%)
Mutual labels:  logstash, elk, logging
Ansible Elk Playbook
A playbook for setting up the ELK Stack + beats log shippers on Ubuntu 16.04 and above
Stars: ✭ 83 (-38.97%)
Mutual labels:  ansible, elk
Docker Elk
The Elastic stack (ELK) powered by Docker and Compose.
Stars: ✭ 12,327 (+8963.97%)
Mutual labels:  logstash, elk
Ypsilon
Automated Use Case Testing
Stars: ✭ 135 (-0.74%)
Mutual labels:  ansible, elk
Elkstack
The config files and docker-compose.yml files of Dockerized ELK Stack
Stars: ✭ 96 (-29.41%)
Mutual labels:  logstash, elk
Ansible Config encoder filters
Ansible role used to deliver the Config Encoder Filters.
Stars: ✭ 48 (-64.71%)
Mutual labels:  ansible, logstash
Xsrv
[mirror] Install and manage self-hosted services/applications, on your own server(s) - ansible collection and utilities
Stars: ✭ 89 (-34.56%)
Mutual labels:  ansible, logging
Logtrail
Kibana plugin to view, search & live tail log events
Stars: ✭ 1,343 (+887.5%)
Mutual labels:  logstash, logging
Docker Elk Cadvisor Dashboards
ElasticSearch 1.7 (+data container) | Logstash 1.5.3 (+conf for elk logs) | Kibana 4 (+Dashboard for elk logs) | cAdvisor (Collect & View containers performance) | Nginx Proxy 1.9.3 (for SSL + password access).
Stars: ✭ 83 (-38.97%)
Mutual labels:  logstash, elk
Ansible Role Ruby
Ansible Role - Ruby
Stars: ✭ 77 (-43.38%)
Mutual labels:  ansible, role
Elk Hole
elasticsearch, logstash and kibana configuration for pi-hole visualiziation
Stars: ✭ 136 (+0%)
Mutual labels:  logstash, logging
Ansible Role Memcached
Ansible Role - Memcached
Stars: ✭ 54 (-60.29%)
Mutual labels:  ansible, role
Aws Securitygroup Grapher
This ansible role gets information from an AWS VPC and generate a graphical representation of security groups
Stars: ✭ 93 (-31.62%)
Mutual labels:  ansible, role
Ansible Role Haproxy
Ansible Role - HAProxy
Stars: ✭ 112 (-17.65%)
Mutual labels:  ansible, role
Network Engine
This role provides the foundation for building network roles by providing modules and plugins that are common to all Ansible Network roles.
Stars: ✭ 108 (-20.59%)
Mutual labels:  ansible, role
Elastic
Elastic Stack (6.2.4) 을 ν™œμš©ν•œ Dashboard λ§Œλ“€κΈ° Project
Stars: ✭ 121 (-11.03%)
Mutual labels:  logstash, elk
Ansible Mysql Hardening
This Ansible role provides security configuration for MySQL.
Stars: ✭ 132 (-2.94%)
Mutual labels:  ansible, role

Ansible Role: Logstash

CI

An Ansible Role that installs Logstash on RedHat/CentOS Debian/Ubuntu.

Note that this role installs a syslog grok pattern by default; if you want to add more filters, please add them inside the /etc/logstash/conf.d/ directory. As an example, you could create a file named 13-myapp.conf with the appropriate grok filter and restart logstash to start using it. Test your grok regex using the Grok Debugger.

Requirements

Though other methods are possible, this role is made to work with Elasticsearch as a backend for storing log messages.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

logstash_version: '7.x'

The major version of Logstash to install.

logstash_listen_port_beats: 5044

The port over which Logstash will listen for beats.

logstash_elasticsearch_hosts:
  - http://localhost:9200

The hosts where Logstash should ship logs to Elasticsearch.

logstash_dir: /usr/share/logstash

The directory inside which Logstash is installed.

logstash_ssl_dir: /etc/pki/logstash
logstash_ssl_certificate_file: logstash-forwarder-example.crt
logstash_ssl_key_file: logstash-forwarder-example.key

Local paths to the SSL certificate and key files, which will be copied into the logstash_ssl_dir.

See Generating a self-signed certificate for information about generating and using self-signed certs with Logstash and Filebeat.

logstash_local_syslog_path: /var/log/syslog
logstash_monitor_local_syslog: true

Whether configuration for local syslog file (defined as logstash_local_syslog_path) should be added to logstash. Set this to false if you are monitoring the local syslog differently, or if you don't care about the local syslog file. Other local logs can be added by your own configuration files placed inside /etc/logstash/conf.d.

logstash_enabled_on_boot: true

Set this to false if you don't want logstash to run on system startup.

logstash_install_plugins:
  - logstash-input-beats
  - logstash-filter-multiline

A list of Logstash plugins that should be installed.

Generating a Self-signed certificate

For utmost security, you should use your own valid certificate and keyfile, and update the logstash_ssl_* variables in your playbook to use your certificate.

To generate a self-signed certificate/key pair, you can use use the command:

$ openssl req -x509 -batch -nodes -days 3650 -newkey rsa:2048 -keyout logstash.key -out logstash.crt -subj '/CN=example.com'

Note that Filebeat and Logstash may not work correctly with self-signed certificates unless you also have the full chain of trust (including the Certificate Authority for your self-signed cert) added on your server. See: https://github.com/elastic/logstash/issues/4926#issuecomment-203936891

Newer versions of Filebeat and Logstash also require a pkcs8-formatted private key, which can be generated by converting the key generated earlier, e.g.:

openssl pkcs8 -in logstash.key -topk8 -nocrypt -out logstash.p8

Other Notes

If you are seeing high CPU usage from one of the logstash processes, and you're using Logstash along with another application running on port 80 on a platform like Ubuntu with upstart, the logstash-web process may be stuck in a loop trying to start on port 80, failing, and trying to start again, due to the restart flag being present in /etc/init/logstash-web.conf. To avoid this problem, either change that line to add a limit to the respawn statement, or set the logstash-web service to enabled=no in your playbook, e.g.:

- name: Ensure logstash-web process is stopped and disabled.
  service: name=logstash-web state=stopped enabled=no

Example Playbook

- hosts: search

  pre_tasks:
    - name: Use Java 8 on Debian/Ubuntu.
      set_fact:
        java_packages:
          - openjdk-8-jdk
      when: ansible_os_family == 'Debian'

  roles:
    - geerlingguy.java
    - geerlingguy.elasticsearch
    - geerlingguy.logstash

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

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].