metrics

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: Apache-2.0 Imports: 9 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
}

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