Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertFilter ¶
type AlertFilter struct {
// Labels filters alerts by attached labels. If only a key is provided, we only match on the key.
// Values that start with "regexp/" are regexp compiled and then matched against a value stored at that key.
// Defaults to all labels.
Labels map[string]string
// ActiveAt filters out any alerts that are before this time. Defaults to all alerts.
ActiveAt time.Time
// States filters alerts to only ones in these states. Defaults to all states.
States []string
// Value filters out all values that don't match the regex.
Value *regexp.Regexp
// contains filtered or unexported fields
}
AlertFilter represents a filter you can use to filter out alerts.
func (*AlertFilter) Compile ¶
func (a *AlertFilter) Compile() error
Compile compiles the AlertFilter. If this is a one off query, no need to do this. If you plan to reuse the filter, this will increase the speed. Changing a filter after Compile() is called will not give you the desired result, create a new filter instead.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper around the prometheus Go client for our needs.
func New ¶
New creates a new client connecting to the HTTP address provided. This should be in the form of http[s]://[domain,host,ip]:[port] .
Click to show internal directories.
Click to hide internal directories.