Documentation
¶
Index ¶
Constants ¶
View Source
const Type = "prometheus"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// URL points to the metrics endpoint of the service to be monitored.
URL string `yaml:"url"`
// ScrapeInterval is the time between scrapes (defaults to 1s).
ScrapeInterval time.Duration `yaml:"scrape-interval"`
// Queries are the query configurations used when querying the collected
// metrics.
Queries []QueryConfig `yaml:"queries"`
}
type QueryConfig ¶
type QueryConfig struct {
Name string `yaml:"name"`
// QueryString is the PromQL query string to be executed.
QueryString string `yaml:"query"`
// Interval is the query resolution.
Interval time.Duration `yaml:"interval"`
// Unit is the unit of the metric, only for display purposes (optional).
Unit string `yaml:"unit"`
}
type QueryLogger ¶
func (QueryLogger) Close ¶
func (QueryLogger) Close() error
type SequentialQueryTracker ¶
type SequentialQueryTracker chan struct{}
SequentialQueryTracker is a query tracker that allows only one query to be active at a time.
func NewSequentialQueryTracker ¶
func NewSequentialQueryTracker() SequentialQueryTracker
func (SequentialQueryTracker) Close ¶
func (s SequentialQueryTracker) Close() error
func (SequentialQueryTracker) Delete ¶
func (s SequentialQueryTracker) Delete(int)
func (SequentialQueryTracker) GetMaxConcurrent ¶
func (s SequentialQueryTracker) GetMaxConcurrent() int
Click to show internal directories.
Click to hide internal directories.