exporter

package
v0.0.0-...-17e614c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIpLocationDetails

func GetIpLocationDetails(ipAddress string) (city *geoip2.City, err error)

func SetDebugging

func SetDebugging(flag bool)

func SetExludeIPs

func SetExludeIPs(ips string)

func SetGeoIPPath

func SetGeoIPPath(path string)

func SetPrometheusEndpointAndPort

func SetPrometheusEndpointAndPort(path, port string)

func Shutdown

func Shutdown()

func Start

func Start()

Types

type AuthLog

type AuthLog struct {
	LastLogTime time.Time
	LastLine    *AuthLogLine

	Metrics metrics
	Debug   bool
	// contains filtered or unexported fields
}

func LoadAuthLog

func LoadAuthLog(filePath string) (*AuthLog, error)

func (*AuthLog) AddMetrics

func (a *AuthLog) AddMetrics()

func (*AuthLog) Close

func (a *AuthLog) Close()

func (*AuthLog) ParseLine

func (a *AuthLog) ParseLine(line *tail.Line)

func (*AuthLog) SetupMetrics

func (a *AuthLog) SetupMetrics()

func (*AuthLog) StartExport

func (a *AuthLog) StartExport() error

type AuthLogLine

type AuthLogLine struct {
	Time      time.Time
	Type      string
	Hostname  string
	Username  string
	IPAddress string
	Process   string
	PID       int
	RawLine   string
}

type Exporter

type Exporter interface {
	StartExport() error
	Close()
	AddMetrics()
}

type GeoIPDatabase

type GeoIPDatabase struct {
	// contains filtered or unexported fields
}

func (*GeoIPDatabase) Close

func (db *GeoIPDatabase) Close()

type RequestLog

type RequestLog struct {
	LastLogTime time.Time
	LastLine    *RequestLogLine

	Metrics metrics
	Debug   bool
	// contains filtered or unexported fields
}

func LoadRequestLog

func LoadRequestLog(filePath, lineParser string) (*RequestLog, error)

func (*RequestLog) AddMetrics

func (a *RequestLog) AddMetrics()

func (*RequestLog) Close

func (a *RequestLog) Close()

func (*RequestLog) ParseLine

func (a *RequestLog) ParseLine(line *tail.Line)

func (*RequestLog) SetupMetrics

func (a *RequestLog) SetupMetrics()

func (*RequestLog) StartExport

func (a *RequestLog) StartExport() error

type RequestLogLine

type RequestLogLine struct {
	Time       time.Time
	Domain     string
	IPAddress  string
	StatusCode string
	Method     string
	RawLine    string
}

Jump to

Keyboard shortcuts

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