All Projects → breml → logstash-config

breml / logstash-config

Licence: Apache-2.0 license
logstash-config provides a parser and abstract syntax tree (AST) for the Logstash config format, written in Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to logstash-config

Config
Various program configuration files and scripts
Stars: ✭ 173 (+565.38%)
Mutual labels:  config, configuration
Konf
A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats
Stars: ✭ 225 (+765.38%)
Mutual labels:  config, configuration
Aconfig
Simple, useful and opinionated config loader.
Stars: ✭ 187 (+619.23%)
Mutual labels:  config, configuration
Gcfg
read INI-style configuration files into Go structs; supports user-defined types and subsections
Stars: ✭ 146 (+461.54%)
Mutual labels:  config, configuration
Flex-AntiCheat
Flex AntiCheat - Optimized Configs For Multiple AntiCheats
Stars: ✭ 37 (+42.31%)
Mutual labels:  config, configuration
Magento2 Configurator
Magento 2 Configurator
Stars: ✭ 158 (+507.69%)
Mutual labels:  config, configuration
Environ Config
Python Application Configuration With Environment Variables
Stars: ✭ 210 (+707.69%)
Mutual labels:  config, configuration
Node Convict
Featureful configuration management library for Node.js
Stars: ✭ 1,855 (+7034.62%)
Mutual labels:  config, configuration
dotfiles
Linux configuration files (dotfiles) and some useful scripts
Stars: ✭ 22 (-15.38%)
Mutual labels:  config, configuration
sitri
Sitri - powerful settings & configs for python
Stars: ✭ 20 (-23.08%)
Mutual labels:  config, configuration
Config
Easiest way to add multi-environment yaml settings to Rails, Sinatra, Pandrino and other Ruby projects.
Stars: ✭ 1,821 (+6903.85%)
Mutual labels:  config, configuration
libconfini
Yet another INI parser
Stars: ✭ 106 (+307.69%)
Mutual labels:  config, configuration
Config
Manage Laravel configuration by persistent storage
Stars: ✭ 139 (+434.62%)
Mutual labels:  config, configuration
Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (+534.62%)
Mutual labels:  config, configuration
Surfingkeys Conf
A SurfingKeys configuration which adds 130+ key mappings for 20+ sites & OmniBar search suggestions for 50+ sites
Stars: ✭ 137 (+426.92%)
Mutual labels:  config, configuration
Config
🛠 A configuration library for Go that parses environment variables, JSON files, and reloads automatically on SIGHUP
Stars: ✭ 203 (+680.77%)
Mutual labels:  config, configuration
Confl
Config parser for go, modeled after Nginx format, Nice lenient syntax with Comments
Stars: ✭ 127 (+388.46%)
Mutual labels:  config, configuration
Ngx Config
Configuration utility for Angular
Stars: ✭ 135 (+419.23%)
Mutual labels:  config, configuration
Winton.extensions.configuration.consul
Enables Consul to be used as a configuration source in dotnet core applications
Stars: ✭ 239 (+819.23%)
Mutual labels:  config, configuration
javaproperties
Python library for reading & writing Java .properties files
Stars: ✭ 20 (-23.08%)
Mutual labels:  config, configuration

logstash-config : parser and abstract syntax tree for Logstash config files

Test Status Go Report Card
GoDoc License

Overview

The Go package config provides a ready to use parser for Logstash (github) configuration files.

The basis of the grammar for the parsing of the Logstash configuration format is the original Logstash Treetop grammar which could be used with only minor changes.

logstash-config uses pigeon to generate the parser from the PEG (parser expression grammar). Special thanks to Martin Angers (mna).

This package is currently under development, no API guaranties.

Install

go get -t github.com/breml/logstash-config/...

Usage

mustache

mustache is a command line tool that allows to syntax check, lint and format Logstash configuration files. The name of the tool is inspired by the original Logstash Logo (wooden character with an eye-catching mustache).

The check command verifies the syntax of Logstash configuration files:

mustache check file.conf

The lint command checks for problems in Logstash configuration files.

The following checks are performed:

  • Valid Logstash configuration file syntax
  • No comments in exceptional places (these are comments, that are valid by the Logstash configuration file syntax, but but are located in exceptional or uncommon locations)
  • Precence of an id attribute for each plugin in the Logstash configuration

If the --auto-fix-id flag is passed, each plugin gets automatically an ID. Be aware, that this potentially reformats the Logstash configuration files.

mustache lint --auto-fix-id file.conf

With the format command, mustache returns the provided configuration files in a standardized format (indentation, location of comments). By default, the reformatted file is print to standard out. If the flag --write-to-source is provided, the Logstash config files are reformatted in place.

mustache format --write-to-source file.conf

Use the --help flag to get more information about the usage of the tool.

Rebuild parser

  1. Get and install pigeon.
  2. Run go generate in the root directory of this repository.

Author

Copyright 2017-2021 by Lucas Bremgartner (breml)

License

Apache 2.0

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