prometheus

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfgBaseName string) (collector.Collector, error)

New creates new prom collector

Types

type Prom

type Prom struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Prom defines prom collector

func (*Prom) Collect

func (c *Prom) Collect(ctx context.Context) error

Collect returns collector metrics

func (*Prom) Flush

func (c *Prom) Flush() cgm.Metrics

Flush returns last metrics collected

func (*Prom) ID

func (c *Prom) ID() string

ID returns the id of the instance

func (*Prom) Inventory

func (c *Prom) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*Prom) Logger added in v0.19.1

func (c *Prom) Logger() zerolog.Logger

Logger returns collector's instance of logger

type URLDef

type URLDef struct {
	ID  string `json:"id" toml:"id" yaml:"id"`
	URL string `json:"url" toml:"url" yaml:"url"`
	TTL string `json:"ttl" toml:"ttl" yaml:"ttl"`
	// contains filtered or unexported fields
}

URLDef defines a url to fetch text formatted prom metrics from

Jump to

Keyboard shortcuts

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