Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler interface { Set(*sync.WaitGroup, *redis.Conn, *redis.Conn, io.Reader, int, *sync.WaitGroup, *chan error, time.Duration) SetReader(io.Reader) Pull(chan error) Flush() error MISPexport() error }
Compiler provides the interface for a Compiler It should provide:
Set to assign a redis connection to it Parse to parse a line of log Flush recomputes statistics and recompile output
type CompilerStruct ¶
type CompilerStruct struct {
// contains filtered or unexported fields
}
CompilerStruct will implements Compiler, and should be embedded in each type implementing compiler
func (*CompilerStruct) Set ¶
func (s *CompilerStruct) Set(wg *sync.WaitGroup, rconn0 *redis.Conn, rconn1 *redis.Conn, reader io.Reader, ct int, compilegr *sync.WaitGroup, c *chan error, retry time.Duration)
Set set the redis connections to this compiler
func (*CompilerStruct) SetReader ¶
func (s *CompilerStruct) SetReader(reader io.Reader)
SetReader Changes compiler's input
type GrokedSSHD ¶
type GrokedSSHD struct { SSHMessage string `json:"ssh_message"` SyslogPid string `json:"syslog_pid"` SyslogHostname string `json:"syslog_hostname"` SyslogTimestamp string `json:"syslog_timestamp"` SshdClientIP string `json:"sshd_client_ip"` SyslogProgram string `json:"syslog_program"` SshdInvalidUser string `json:"sshd_invalid_user"` }
GrokedSSHD map JSON fields to Go struct
type SSHDCompiler ¶
type SSHDCompiler struct {
CompilerStruct
}
SSHDCompiler Holds a struct that corresponds to a sshd groked line and the redis connections
func (*SSHDCompiler) Flush ¶
func (s *SSHDCompiler) Flush() error
Flush recomputes statistics and recompile HTML output TODO : review after refacto
func (*SSHDCompiler) MISPexport ¶
func (s *SSHDCompiler) MISPexport() error
func (*SSHDCompiler) Pull ¶
func (s *SSHDCompiler) Pull(c chan error)
Pull pulls a line of groked sshd logline from redis
Click to show internal directories.
Click to hide internal directories.