Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Addr string
// The meta query limit for series returned
Limit int
Retentions []Retention
Filters []string
Normalize bool
HardTS int64
MsecsTime bool
// contains filtered or unexported fields
}
Client object holds general config about how queries should be performed
func (Client) FindMetrics ¶
FindMetrics discovers all metrics that OpenTSDB knows about (given a filter) e.g. /api/suggest?type=metrics&q=system&max=100000
func (Client) FindSeries ¶
FindSeries discovers all series associated with a metric e.g. /api/search/lookup?m=system.load5&limit=1000000
type Config ¶
type Config struct {
Addr string
Limit int
Offset int64
HardTS int64
Retentions []string
Filters []string
Normalize bool
MsecsTime bool
Transport *http.Transport
}
Config contains fields required for Client configuration
type MetaResults ¶
MetaResults contains return data from search series lookup queries
type OtsdbMetric ¶ added in v1.70.0
type OtsdbMetric struct {
Metric string
Tags map[string]string
AggregateTags []string
Dps map[int64]float64
}
OtsdbMetric is a single series in OpenTSDB's returned format
type Retention ¶
type Retention struct {
/*
OpenTSDB has two levels of aggregation,
First, we aggregate any un-mentioned tags into the last result
Second, we aggregate into buckets over time
To simulate this with config, we have
FirstOrder (e.g. sum/avg/max/etc.)
SecondOrder (e.g. sum/avg/max/etc.)
AggTime (e.g. 1m/10m/1d/etc.)
This will build into m=<FirstOrder>:<AggTime>-<SecondOrder>-none:
Or an example: m=sum:1m-avg-none
*/
FirstOrder string
SecondOrder string
AggTime string
// The actual ranges will attempt to query (as offsets from now)
QueryRanges []TimeRange
}
Retention objects contain meta data about what to query for our run
type RetentionMeta ¶
RetentionMeta objects exist to pass smaller subsets (only one retention range) of a full Retention object around