taleeb.dev

Working With Logstash

2019-12-27 · logstash, elasticsearch, logging

Introduction

In this post, I want to share some of my findings from working with Logstash. I was recently tasked with shipping logs from multiple network devices to an Elasticsearch cluster. The cluster was already receiving logs from thousands of Beats agents (Filebeat and Winlogbeat), and I had just finished configuring a cluster of syslog servers to receive logs from these network devices. You can read more about that in Working with Rsyslog.

Before we dive in I think it is important to explain the different stages of a Logstash processing pipeline. Logstash has three stages:

A message flows through the stages in order: an input receives the event, filters transform it, and an output ships it onward. A failing filter does not stop the pipeline by default — Logstash tags the event (for example with _grokparsefailure) and passes it along, which is worth remembering when you design your dashboards: filter your failures out deliberately instead of letting them pollute your indices.