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) UpdateCheckApplyTotal ¶
func (obj *Prometheus) UpdateCheckApplyTotal(kind string, apply, eventful, errorful bool) error
UpdateCheckApplyTotal refreshes the failing gauge by parsing the internal state map.
Click to show internal directories.
Click to hide internal directories.