canaryeye

package module
v0.0.0-...-ccd221d Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2016 License: MIT Imports: 12 Imported by: 0

README

Canaryeye

Canaryeye detects (D)DoS attack from access log.

Install

$ go get -u github.com/ariarijp/canaryeye/cmd/canaryeye

Usage

Send JSON string to "cat" command via pipe, when Canaryeye detects 30 requests by same host within 10 seconds.

$ CANARYEYE_SLEEP=10 CANARYEYE_THRESHOLD=30 canaryeye /path/to/access.log "cat"

License

MIT

Author

ariarijp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() config

func GetTailConfig

func GetTailConfig() *tail.Config

func HandleError

func HandleError(err error)

func Run

func Run(c config, m *map[string]int, begin *time.Time, cmd string)

Types

type Result

type Result struct {
	Host  string `json:"host"`
	Count int    `json:"count"`
}

type ResultSlice

type ResultSlice struct {
	Results []Result `json:"results"`
}

func GetResultSlice

func GetResultSlice(r io.Reader) ResultSlice

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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