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'] } }