Documentation ¶
Index ¶
Constants ¶
View Source
const ErrorTag = "gogstash_input_exec_error"
ErrorTag tag added to event when process module failed
View Source
const ModuleName = "exec"
ModuleName is the name used in config file
Variables ¶
View Source
var (
ErrorExecCommandFailed1 = errutil.NewFactory("run exec failed: %q")
)
errors
Functions ¶
func InitHandler ¶
InitHandler initialize the input plugin
Types ¶
type InputConfig ¶
type InputConfig struct { config.InputConfig Command string `json:"command"` // Command to run. e.g. “uptime” Args []string `json:"args,omitempty"` // Arguments of command Interval int `json:"interval,omitempty"` // Second, default: 60 MsgTrim string `json:"message_trim,omitempty"` // default: " \t\r\n" MsgPrefix string `json:"message_prefix,omitempty"` // only in text type, e.g. "%{@timestamp} [uptime] " MsgType MsgType `json:"message_type,omitempty"` // default: "text" // contains filtered or unexported fields }
InputConfig holds the configuration json fields and internal objects
func DefaultInputConfig ¶
func DefaultInputConfig() InputConfig
DefaultInputConfig returns an InputConfig struct with default values
type MsgType ¶
type MsgType int8
func ParseMsgType ¶
func (MsgType) MarshalJSON ¶
func (*MsgType) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.