Skip to content

if-nil/beats-output-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beats-output-mongodb

Elastic Beats Output to MongoDB.

Usage

git clone https://github.com/huawen0327/beats-output-mongodb.git
cd beats-output-mongodb/cmd 
go build -o filebeat.exe
./filebeat -c config.yml -e

or

package main

import (
	"github.com/elastic/beats/v7/filebeat/cmd"
	inputs "github.com/elastic/beats/v7/filebeat/input/default-inputs"
	_ "github.com/huawen0327/beats-output-mongodb"
	"os"
)

func main() {
	if err := cmd.Filebeat(inputs.Init, cmd.FilebeatSettings()).Execute(); err != nil {
		os.Exit(1)
	}
}

config.yml

output.mongodb:
  hosts: ["mongodb://localhost:27017", "mongodb://localhost:27018"]
  db: test_log
  collection: test_log
  bulk_max_size: 20

About

Elastic Beats Output to MongoDB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages