mongoout

package module
v0.0.0-...-cc99a2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL