monitor

package
v0.0.0-...-0f2ffd9 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecMonitor

type ExecMonitor struct {
	MonitorName  string
	ContainerIds []string
}

func (ExecMonitor) Start

func (e ExecMonitor) Start(messages chan<- []byte, dockerComposeName string)

type FSMonitor

type FSMonitor struct {
	MonitorName string
	DockerDirs  []string
	// contains filtered or unexported fields
}

Store the MonitorName, which is the name of the program to execute, the * DockerDirs which are the directories to monitor which our Docker containers * of interest live in, and a pointer to the exec.Cmd struct which describes * the running command.

func (FSMonitor) Start

func (m FSMonitor) Start(messages chan<- []byte, dockerComposeName string)

Start the process running on the honeypot host to monitor the Docker * container. The Docker container's filesystem is mounted on the host. Find * the location of this filesystem with the getDockerFSDirectory function and * store it in the struct. Then create and start the process and forward * the output of the process on to the messages channel.

func (FSMonitor) Stop

func (m FSMonitor) Stop()

Stop the filesystem monitor. Kill the process monitoring the Docker * container's filesysem.

type Monitor

type Monitor interface {
	Start(messages chan<- []byte, dockerComposeName string)
	Stop()
}

The Monitor interface defines a series of methods which will be defined on * monitor structs. The Start method takes a channel to send messages over, * back to the configurator. The Stop method kills the process which is * performing the actual monitoring.

type NetMonitor

type NetMonitor struct {
	MonitorName  string
	ContainerIds []string
}

func (NetMonitor) Start

func (n NetMonitor) Start(messages chan<- []byte, dockerComposeName string)

Jump to

Keyboard shortcuts

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