Documentation ¶
Index ¶
Constants ¶
View Source
const (
ModuleName = "exec"
)
Variables ¶
This section is empty.
Functions ¶
func InitHandler ¶
func InitHandler(confraw *config.ConfigRaw) (retconf config.TypeInputConfig, err error)
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 }
func DefaultInputConfig ¶
func DefaultInputConfig() InputConfig
func (*InputConfig) Exec ¶
func (self *InputConfig) Exec(inchan config.InChan, logger *logrus.Logger)
func (*InputConfig) Start ¶
func (self *InputConfig) Start()
type MsgType ¶
type MsgType int8
func ParseMsgType ¶
func (MsgType) MarshalJSON ¶
func (*MsgType) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.