Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromClient ¶
type PromClient struct {
// contains filtered or unexported fields
}
PromClient is a wrapper around the Prometheus Client interface and implements the api This way, the PromClient can be instantiated with the configuration the Client needs, and the ability to use the methods the api has, like Query and so on.
func NewPromClient ¶
func NewPromClient(conf papi.Config) (*PromClient, error)
NewPromClient creates a new client to the Prometheus API. It returns an error on any problem.
func (*PromClient) ActiveAlerts ¶
ActiveAlerts is a method of type PromClient, it returns a list of names of active alerts (e.g. pending or firing), filtered by the supplied regexp or by the includeLabels query. filter by regexp means when the regex finds the alert-name; the alert is exluded from the block-list and will NOT block rebooting. query by includeLabel means, if the query finds an alert, it will include it to the block-list and it WILL block rebooting.