Hackforge Academy

Category: devops

what is logstash in devops

Published on 04 Jun 2026

Explanation

Logstash is a data processing tool used in DevOps to collect, transform, and forward logs from multiple sources to destinations such as Elasticsearch.

Code:


Explanation

A Logstash pipeline has three stages: Input, Filter, and Output. Logs are collected, processed, and then sent to a target system.

Code:

Input -> Filter -> Output

Explanation

Input plugins collect logs from sources such as files, applications, databases, and message queues.

Code:

input { file { path => '/var/log/app.log' } }

Explanation

Filter plugins parse and transform log data by extracting useful information from raw log messages.

Code:

filter { grok { match => { 'message' => 
'%{LOGLEVEL:level} %{GREEDYDATA:msg}' } } }

Explanation

Output plugins send processed logs to destinations such as Elasticsearch for searching and Kibana for visualization.

Code:

output { elasticsearch { hosts => 
['localhost:9200'] } }

๐Ÿš€ Learn Spring Boot with real-world projects

๐Ÿ’ก Build REST APIs step by step

๐Ÿง  Improve backend development skills

๐ŸŽฏ Get career-ready practical training

Join Our Free WhatsApp Community

Direct access to niche-specific mentors and peers on WhatsApp.

๐Ÿ

Python Community

Discuss Django, FastAPI, AI integration, and automation scripts with 15k+ developers.

Join Python Community
โš›๏ธ

React Community

Master Next.js, Framer Motion, and State Management. Share your latest UI components.

Join React Community
โ˜•

Java Community

Deep dives into Spring Boot, Microservices architecture, and high-performance backend ops.

Join Java Community