metrics

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApacheCombinedLogRegex = regexp.MustCompile(`^(?P<client_host>\S+)\s-\s+(?P<username>\S+\s+)+\[(?P<timestamp>[^]]+)\]\s"(?P<method>\S*)\s?(?P<path>(?:[^"]*(?:\\")?)*)\s(?P<protocol>[^"]*)"\s(?P<status>\d+)\s(?P<content_size>\d+)\s"(?P<referer>(?:[^"]*(?:\\")?)*)"\s"(?P<useragent>.*)"\s(?P<request_count>\d+)\s"(?P<frontend_name>[^"]+)"\s"(?P<backend_url>[^"]+)"\s(?P<request_time>\d+)ms$`)

Functions

This section is empty.

Types

type ProcessRule

type ProcessRule struct {
	Id           string
	PathRegexp   *regexp.Regexp
	MethodRegexp *regexp.Regexp
	Filter       RuleFilter
}

type RuleFilter

type RuleFilter func(model.TraefikLog) bool

type TraefikMetricProcessor

type TraefikMetricProcessor struct {
	Rules map[*regexp.Regexp]ProcessRule
	// contains filtered or unexported fields
}

func NewTraefikMetricProcessor

func NewTraefikMetricProcessor(config []common.RulesConfig) (*TraefikMetricProcessor, error)

func (TraefikMetricProcessor) Process

func (mp TraefikMetricProcessor) Process(entry model.TraefikLog, timestamp int64, measurement string) (client.BatchPoints, error)

Jump to

Keyboard shortcuts

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