prometheus

package
v0.0.0-...-b7948c7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2017 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package prometheus provides functions that are useful to control and manage the build-in prometheus instance.

Index

Constants

View Source
const DefaultPrometheusListen = "127.0.0.1:9233"

DefaultPrometheusListen is registered in https://github.com/prometheus/prometheus/wiki/Default-port-allocations

Variables

This section is empty.

Functions

This section is empty.

Types

type Prometheus

type Prometheus struct {
	Listen string // the listen specification for the net/http server
	// contains filtered or unexported fields
}

Prometheus is the struct that contains information about the prometheus instance. Run Init() on it.

func (*Prometheus) Init

func (obj *Prometheus) Init() error

Init some parameters - currently the Listen address.

func (*Prometheus) Start

func (obj *Prometheus) Start() error

Start runs a http server in a go routine, that responds to /metrics as prometheus would expect.

func (*Prometheus) Stop

func (obj *Prometheus) Stop() error

Stop the http server.

func (*Prometheus) UpdateCheckApplyTotal

func (obj *Prometheus) UpdateCheckApplyTotal(kind string, apply, eventful, errorful bool) error

UpdateCheckApplyTotal refreshes the failing gauge by parsing the internal state map.

Jump to

Keyboard shortcuts

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