8000 GitHub - fifthl/logstash-conf: generate logstash.conf · GitHub
[go: up one dir, main page]

Skip to content

About

generate logstash.conf

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logstash-conf

  • 自动生成和配置logstash.conf

使用

  • 安装依赖
go mod tidy
  • 编译
go build -o logstash-conf
  • help
logstash-conf -h

Usage:
  logstash-conf [flags]

Examples:
logstash-conf [--confDir] [--topic] [--group]

Flags:
  -c, --conf string    *specify logstash.conf file path
  -g, --group string   specify kafka group id (default "donet")
  -h, --help           help for logstash-conf
  -t, --topic string   *kafka topic name, example: test.abc
  • 配置
logstash-conf --conf=logstash.conf --topic=test.abc
# test.haha add done

logstash.conf

input {
   kafka {
    codec => "json"
    topics => ["test.xxx"]
    bootstrap_servers => "10.32.12.12:9092"
    auto_offset_reset => "latest"
    group_id => "donet"
    decorate_events => true
    type => "testxxx"
  }kafka {
    codec => "json"
    topics => ["test.service"]
    bootstrap_servers => "10.32.12.12:9092"
    auto_offset_reset => "latest"
    group_id => "donet"
    decorate_events => true
    type => "testservice"
  }
}
output {
  if[type] == "testwcx"{
   elasticsearch {
     hosts => [ "10.32.12.11:9200" ]
     index => "testwcx-%{+YYYY.MM.dd}"
  }
 }if[type] == "testcrmr"{
   elasticsearch {
     hosts => [ "10.32.12.11:9200" ]
     index => "testcrmr-%{+YYYY.MM.dd}"
  }
 }
}

About

generate logstash.conf

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0