metrics

package
v0.0.0-...-e962cbb Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Port      = os.Getenv("PROMETHEUS_PORT")
	Path      = envOrDefault("PROMETHEUS_PATH", "/metrics")
	Namespace = envOrDefault("PROMETHEUS_NAMESPACE", "skydns")
	Subsystem = envOrDefault("PROMETHEUS_SUBSYSTEM", "skydns")
)
View Source
var (
	Auth    System = "auth"
	Cache   System = "cache"
	Rec     System = "recursive"
	Reverse System = "reverse"
	Stub    System = "stub"

	Nxdomain  Cause = "nxdomain"
	Nodata    Cause = "nodata"
	Truncated Cause = "truncated"
	Refused   Cause = "refused"
	Overflow  Cause = "overflow"
	Fail      Cause = "servfail"

	Response  CacheType = "response"
	Signature CacheType = "signature"
)

Functions

func Metrics

func Metrics() error

Metrics registers the DNS metrics to Prometheus, and starts the internal metrics server if the environment variable PROMETHEUS_PORT is set.

func ReportCacheMiss

func ReportCacheMiss(ca CacheType)

func ReportDuration

func ReportDuration(resp *dns.Msg, start time.Time, sys System)

func ReportErrorCount

func ReportErrorCount(resp *dns.Msg, sys System)

func ReportRequestCount

func ReportRequestCount(req *dns.Msg, sys System)

Types

type CacheType

type CacheType string

type Cause

type Cause string

type System

type System string

Jump to

Keyboard shortcuts

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