outputreport

package
v0.0.0-...-3e9a38d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 License: LGPL-3.0 Imports: 5 Imported by: 0

README

gogstash output report

Synopsis

{
	"output": [
		{
			"type": "report",

			// (optional), in seconds, default: 5
			"interval": 5,

			// (optional), default: "[2/Jan/2006:15:04:05 -0700]"
			"time_format": "[2/Jan/2006:15:04:05 -0700]"
		}
	]
}

Details

  • type
    • Must be "report"
  • interval
    • Interval for reporting event process count
  • time_format

Documentation

Index

Constants

View Source
const (
	ModuleName = "report"
)

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(confraw *config.ConfigRaw, logger *logrus.Logger) (retconf config.TypeOutputConfig, err error)

Types

type OutputConfig

type OutputConfig struct {
	config.OutputConfig
	Interval     int    `json:"interval,omitempty"`
	TimeFormat   string `json:"time_format,omitempty"`
	ReportPrefix string `json:"report_prefix,omitempty"`

	ProcessCount int `json:"-"`
}

func DefaultOutputConfig

func DefaultOutputConfig() OutputConfig

func (*OutputConfig) Event

func (t *OutputConfig) Event(event logevent.LogEvent) (err error)

func (*OutputConfig) Report

func (t *OutputConfig) Report(logger *logrus.Logger) (err error)

func (*OutputConfig) ReportLoop

func (t *OutputConfig) ReportLoop(logger *logrus.Logger) (err error)

Jump to

Keyboard shortcuts

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