Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the format of logstash config file

Does logstash use its own file syntax in config file? Is there any parser or validator for config file syntax?

For anyone that does not use logstash but have idea about file formats here is a sample syntax:

input {   file {     path => "/var/log/messages"     type => "syslog"   }    file {     path => "/var/log/apache/access.log"     type => "apache"   } } 
like image 967
kokeksibir Avatar asked Jan 29 '14 21:01

kokeksibir


People also ask

What is Logstash format?

Logstash is a plugin-based data collection and processing engine.

What language is Logstash config file?

Logstash is written on JRuby programming language that runs on the JVM, hence you can run Logstash on different platforms. It collects different types of data like Logs, Packets, Events, Transactions, Timestamp Data, etc., from almost every type of source.

What is Logstash conf?

Logstash is the “L” in the ELK Stack — the world's most popular log analysis platform and is responsible for aggregating data from different sources, processing it, and sending it down the pipeline, usually to be directly indexed in Elasticsearch.


1 Answers

The Logstash configuration file is a custom format developed by the Logstash folks using Treetop.

The grammar itself is described in the source file grammar.treetop and compiled using Treetop into the custom grammar.rb parser.

That parser is then used by the pipeline.rb file in order to set up the pipeline from the Logstash configuration.

If you're not that much into Ruby, there's another interesting project called node-logstash which provides a Logstash implementation in Node.js. The configuration format is exactly the same as with the official Logstash, though the parser is obviously a different one written for Node.js. In this project, the Logstash configuration file grammar is described in jison and the parser is also automatically generated, but could be used by any Node.js module simply by requiring that generated parser.

like image 196
Val Avatar answered Sep 19 '22 17:09

Val